From 7844406a8a466a6b16ac317077367d71ad356e91 Mon Sep 17 00:00:00 2001 From: nearnshaw Date: Sat, 6 Jan 2024 09:32:23 -0300 Subject: [PATCH] fix sync of IDs --- assets/scene/main.composite | 14 +++++++------- bin/game.js | 13 ++++++++++--- bin/game.js.map | 10 +++++----- main.crdt | Bin 19806 -> 19806 bytes scene.json | 5 ++++- src/modules/customers.ts | 18 ++++++++++++++++-- src/modules/factory.ts | 4 ++-- 7 files changed, 44 insertions(+), 20 deletions(-) diff --git a/assets/scene/main.composite b/assets/scene/main.composite index 83af9e7..980b22d 100644 --- a/assets/scene/main.composite +++ b/assets/scene/main.composite @@ -261,21 +261,21 @@ "521": { "json": { "position": { - "x": 16.390798568725586, + "x": 16.46424102783203, "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 }, + "scale": { + "x": 1, + "y": 1, + "z": 1 + }, "parent": 0 } }, @@ -1758,7 +1758,7 @@ "serializationType": "map" }, "data": { - "541": { + "538": { "json": { "gizmo": 0 } diff --git a/bin/game.js b/bin/game.js index c21e104..6c2d565 100644 --- a/bin/game.js +++ b/bin/game.js @@ -34810,6 +34810,12 @@ function deliverOrder(dishType, customer, dish) { const message = customerWrongDishMessages[Math.floor(Scalar.randomRange(0, customerWrongDishMessages.length))]; customerData.message = message; updateSpeechBubble(customerData.speechBubble, message, 2 /* Bad */); + playSound("sounds/error.mp3", false, getPlayerPosition()); + if (gameData.playerMisses <= 3) { + timers.setTimeout(() => { + restartGame(); + }, 1e3); + } } customerData.receivedDish = true; if (dish) { @@ -34864,6 +34870,7 @@ function restartGame() { for (const [customer] of customers) { hideCustomer(customer); } + playSound("sounds/error.mp3", false, getPlayerPosition()); updateScore(); updateMisses(); } @@ -35133,7 +35140,7 @@ function createIngredient(ingredient, position, fall) { let id = getSyncId(entity); syncEntity( entity, - [AudioSource2.componentId, Transform2.componentId, GrabableObjectComponent.componentId, Tween3.componentId, GltfContainer2.componentId], + [AudioSource2.componentId, Transform2.componentId, GrabableObjectComponent.componentId, Tween3.componentId, GltfContainer2.componentId, DynamicSyncId.componentId], id ); return ingredient; @@ -38171,7 +38178,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.510000228881836, "y": 1.0099999904632568, "z": 14.539999961853027 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.7071067690849304, "z": 0, "w": 0.7071067690849304 }, "parent": 0 } }, "517": { "json": { "position": { "x": 16.479999542236328, "y": 1.0099999904632568, "z": 14.529999732971191 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.7071067690849304, "z": 0, "w": 0.7071067690849304 }, "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.46963119506836, "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 } }, "531": { "json": { "position": { "x": 16.843204498291016, "y": 2.992232322692871, "z": 14.752776145935059 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "532": { "json": { "position": { "x": 16.843204498291016, "y": 2.4553236961364746, "z": 14.752776145935059 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "534": { "json": { "position": { "x": 8, "y": -0.05000000074505806, "z": 8 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "535": { "json": { "position": { "x": 24, "y": -0.05000000074505806, "z": 8 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "536": { "json": { "position": { "x": 24, "y": -0.05000000074505806, "z": 24 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "537": { "json": { "position": { "x": 8, "y": -0.05000000074505806, "z": 24 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "538": { "json": { "position": { "x": 17.479999542236328, "y": 1.2400000095367432, "z": 7.019999980926514 }, "rotation": { "x": 0.7071067690849304, "y": 0, "z": 0, "w": 0.7071067690849304 }, "scale": { "x": 0.75, "y": 0.75, "z": 0.75 }, "parent": 0 } }, "539": { "json": { "position": { "x": 17.445201873779297, "y": 1.742148756980896, "z": 7.010000228881836 }, "rotation": { "x": 0, "y": 1, "z": 0, "w": 6123234262925839e-32 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "540": { "json": { "position": { "x": 12.081329345703125, "y": 4.309999942779541, "z": 1.010474443435669 }, "rotation": { "x": 0, "y": 1, "z": 0, "w": 6123234262925839e-32 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "541": { "json": { "position": { "x": 0.9356998801231384, "y": 4.95363712310791, "z": 12.010000228881836 }, "rotation": { "x": -0.7071067690849304, "y": -4329780632585522e-32, "z": 0.7071067690849304, "w": 4329780632585522e-32 }, "scale": { "x": 0.9999999403953552, "y": 0.9999999403953552, "z": 0.9999999403953552 }, "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 } }, "534": { "json": { "src": "assets/builder/concrete/FloorBaseConcrete_01/FloorBaseConcrete_01.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "535": { "json": { "src": "assets/builder/concrete/FloorBaseConcrete_01/FloorBaseConcrete_01.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "536": { "json": { "src": "assets/builder/concrete/FloorBaseConcrete_01/FloorBaseConcrete_01.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "537": { "json": { "src": "assets/builder/concrete/FloorBaseConcrete_01/FloorBaseConcrete_01.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "538": { "json": { "src": "assets/builder/red_light_button/red_scifi_button.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "540": { "json": { "src": "assets/builder/arrow_sign/Arrow_Sign.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "541": { "json": { "src": "assets/builder/arrow_sign/Arrow_Sign.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" } }, "531": { "json": { "value": "Score" } }, "532": { "json": { "value": "Misses" } }, "534": { "json": { "value": "Concrete" } }, "535": { "json": { "value": "Concrete" } }, "536": { "json": { "value": "Concrete" } }, "537": { "json": { "value": "Concrete" } }, "538": { "json": { "value": "Restart_Button" } }, "539": { "json": { "value": "Text" } }, "540": { "json": { "value": "Arrow Sign" } }, "541": { "json": { "value": "Arrow Sign" } } } }, { "name": "core::TextShape", "jsonSchema": { "type": "object", "properties": {}, "serializationType": "protocol-buffer", "protocolBuffer": "PBTextShape" }, "data": { "531": { "json": { "text": "Score: 0", "font": 2, "fontSize": 6, "fontAutoSize": false, "textAlign": 4, "width": 100, "height": 100, "paddingTop": 0, "paddingRight": 0, "paddingBottom": 0, "paddingLeft": 0, "lineSpacing": 0, "lineCount": 1, "textWrapping": false, "shadowBlur": 0, "shadowOffsetX": 0, "shadowOffsetY": 0, "outlineWidth": 0, "shadowColor": { "r": 1, "g": 1, "b": 1 }, "outlineColor": { "r": 1, "g": 1, "b": 1 }, "textColor": { "r": 1, "g": 1, "b": 1, "a": 1 } } }, "532": { "json": { "text": "Misses: 0", "font": 2, "fontSize": 4, "fontAutoSize": false, "textAlign": 4, "width": 100, "height": 100, "paddingTop": 0, "paddingRight": 0, "paddingBottom": 0, "paddingLeft": 0, "lineSpacing": 0, "lineCount": 1, "textWrapping": false, "shadowBlur": 0, "shadowOffsetX": 0, "shadowOffsetY": 0, "outlineWidth": 0, "shadowColor": { "r": 1, "g": 1, "b": 1 }, "outlineColor": { "r": 1, "g": 1, "b": 1 }, "textColor": { "r": 1, "g": 0, "b": 0, "a": 1 } } }, "539": { "json": { "text": "Restart", "font": 2, "fontSize": 3, "fontAutoSize": false, "textAlign": 4, "width": 100, "height": 100, "paddingTop": 0, "paddingRight": 0, "paddingBottom": 0, "paddingLeft": 0, "lineSpacing": 0, "lineCount": 1, "textWrapping": false, "shadowBlur": 0, "shadowOffsetX": 0, "shadowOffsetY": 0, "outlineWidth": 0, "shadowColor": { "r": 1, "g": 1, "b": 1 }, "outlineColor": { "r": 1, "g": 1, "b": 1 }, "textColor": { "r": 1, "g": 1, "b": 1, "a": 1 } } } } }, { "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 }] } }, "538": { "json": { "states": [{ "clip": "trigger", "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 } }] } }, "538": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 0, "hoverText": "Restart", "maxDistance": 10, "showFeedback": true } }] } } } }, { "name": "inspector::Selection", "jsonSchema": { "type": "object", "properties": { "gizmo": { "type": "integer", "serializationType": "int32" } }, "serializationType": "map" }, "data": { "541": { "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, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540] }, { "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": [] }, { "entity": 531, "children": [] }, { "entity": 532, "children": [] }, { "entity": 533, "children": [] }, { "entity": 534, "children": [] }, { "entity": 535, "children": [] }, { "entity": 536, "children": [] }, { "entity": 537, "children": [] }, { "entity": 538, "children": [] }, { "entity": 539, "children": [] }, { "entity": 540, "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"}' }] } }, "538": { "json": { "id": 5, "value": [{ "name": "Play Activate Animation", "type": "play_animation", "jsonPayload": '{ "animation": "trigger" }' }, { "name": "Play Sound", "type": "play_sound", "jsonPayload": '{"src":"assets/builder/red_light_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": 5 } } } }, { "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" }] }] } }, "538": { "json": { "value": [{ "type": "on_click", "conditions": [], "actions": [{ "id": 5, "name": "Play Activate Animation" }, { "id": 5, "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": {} }, "531": { "json": {} }, "532": { "json": {} }, "534": { "json": {} }, "535": { "json": {} }, "536": { "json": {} }, "537": { "json": {} }, "538": { "json": {} }, "539": { "json": {} }, "540": { "json": {} }, "541": { "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.510000228881836, "y": 1.0099999904632568, "z": 14.539999961853027 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.7071067690849304, "z": 0, "w": 0.7071067690849304 }, "parent": 0 } }, "517": { "json": { "position": { "x": 16.479999542236328, "y": 1.0099999904632568, "z": 14.529999732971191 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.7071067690849304, "z": 0, "w": 0.7071067690849304 }, "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.46963119506836, "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.46424102783203, "y": 0.7099999785423279, "z": 14.05458927154541 }, "rotation": { "x": -0.5, "y": -0.5, "z": 0.5, "w": 0.5 }, "scale": { "x": 1, "y": 1, "z": 1 }, "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 } }, "531": { "json": { "position": { "x": 16.843204498291016, "y": 2.992232322692871, "z": 14.752776145935059 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "532": { "json": { "position": { "x": 16.843204498291016, "y": 2.4553236961364746, "z": 14.752776145935059 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "534": { "json": { "position": { "x": 8, "y": -0.05000000074505806, "z": 8 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "535": { "json": { "position": { "x": 24, "y": -0.05000000074505806, "z": 8 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "536": { "json": { "position": { "x": 24, "y": -0.05000000074505806, "z": 24 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "537": { "json": { "position": { "x": 8, "y": -0.05000000074505806, "z": 24 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "538": { "json": { "position": { "x": 17.479999542236328, "y": 1.2400000095367432, "z": 7.019999980926514 }, "rotation": { "x": 0.7071067690849304, "y": 0, "z": 0, "w": 0.7071067690849304 }, "scale": { "x": 0.75, "y": 0.75, "z": 0.75 }, "parent": 0 } }, "539": { "json": { "position": { "x": 17.445201873779297, "y": 1.742148756980896, "z": 7.010000228881836 }, "rotation": { "x": 0, "y": 1, "z": 0, "w": 6123234262925839e-32 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "540": { "json": { "position": { "x": 12.081329345703125, "y": 4.309999942779541, "z": 1.010474443435669 }, "rotation": { "x": 0, "y": 1, "z": 0, "w": 6123234262925839e-32 }, "scale": { "x": 1, "y": 1, "z": 1 }, "parent": 0 } }, "541": { "json": { "position": { "x": 0.9356998801231384, "y": 4.95363712310791, "z": 12.010000228881836 }, "rotation": { "x": -0.7071067690849304, "y": -4329780632585522e-32, "z": 0.7071067690849304, "w": 4329780632585522e-32 }, "scale": { "x": 0.9999999403953552, "y": 0.9999999403953552, "z": 0.9999999403953552 }, "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 } }, "534": { "json": { "src": "assets/builder/concrete/FloorBaseConcrete_01/FloorBaseConcrete_01.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "535": { "json": { "src": "assets/builder/concrete/FloorBaseConcrete_01/FloorBaseConcrete_01.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "536": { "json": { "src": "assets/builder/concrete/FloorBaseConcrete_01/FloorBaseConcrete_01.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "537": { "json": { "src": "assets/builder/concrete/FloorBaseConcrete_01/FloorBaseConcrete_01.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "538": { "json": { "src": "assets/builder/red_light_button/red_scifi_button.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "540": { "json": { "src": "assets/builder/arrow_sign/Arrow_Sign.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "541": { "json": { "src": "assets/builder/arrow_sign/Arrow_Sign.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" } }, "531": { "json": { "value": "Score" } }, "532": { "json": { "value": "Misses" } }, "534": { "json": { "value": "Concrete" } }, "535": { "json": { "value": "Concrete" } }, "536": { "json": { "value": "Concrete" } }, "537": { "json": { "value": "Concrete" } }, "538": { "json": { "value": "Restart_Button" } }, "539": { "json": { "value": "Text" } }, "540": { "json": { "value": "Arrow Sign" } }, "541": { "json": { "value": "Arrow Sign" } } } }, { "name": "core::TextShape", "jsonSchema": { "type": "object", "properties": {}, "serializationType": "protocol-buffer", "protocolBuffer": "PBTextShape" }, "data": { "531": { "json": { "text": "Score: 0", "font": 2, "fontSize": 6, "fontAutoSize": false, "textAlign": 4, "width": 100, "height": 100, "paddingTop": 0, "paddingRight": 0, "paddingBottom": 0, "paddingLeft": 0, "lineSpacing": 0, "lineCount": 1, "textWrapping": false, "shadowBlur": 0, "shadowOffsetX": 0, "shadowOffsetY": 0, "outlineWidth": 0, "shadowColor": { "r": 1, "g": 1, "b": 1 }, "outlineColor": { "r": 1, "g": 1, "b": 1 }, "textColor": { "r": 1, "g": 1, "b": 1, "a": 1 } } }, "532": { "json": { "text": "Misses: 0", "font": 2, "fontSize": 4, "fontAutoSize": false, "textAlign": 4, "width": 100, "height": 100, "paddingTop": 0, "paddingRight": 0, "paddingBottom": 0, "paddingLeft": 0, "lineSpacing": 0, "lineCount": 1, "textWrapping": false, "shadowBlur": 0, "shadowOffsetX": 0, "shadowOffsetY": 0, "outlineWidth": 0, "shadowColor": { "r": 1, "g": 1, "b": 1 }, "outlineColor": { "r": 1, "g": 1, "b": 1 }, "textColor": { "r": 1, "g": 0, "b": 0, "a": 1 } } }, "539": { "json": { "text": "Restart", "font": 2, "fontSize": 3, "fontAutoSize": false, "textAlign": 4, "width": 100, "height": 100, "paddingTop": 0, "paddingRight": 0, "paddingBottom": 0, "paddingLeft": 0, "lineSpacing": 0, "lineCount": 1, "textWrapping": false, "shadowBlur": 0, "shadowOffsetX": 0, "shadowOffsetY": 0, "outlineWidth": 0, "shadowColor": { "r": 1, "g": 1, "b": 1 }, "outlineColor": { "r": 1, "g": 1, "b": 1 }, "textColor": { "r": 1, "g": 1, "b": 1, "a": 1 } } } } }, { "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 }] } }, "538": { "json": { "states": [{ "clip": "trigger", "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 } }] } }, "538": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 0, "hoverText": "Restart", "maxDistance": 10, "showFeedback": true } }] } } } }, { "name": "inspector::Selection", "jsonSchema": { "type": "object", "properties": { "gizmo": { "type": "integer", "serializationType": "int32" } }, "serializationType": "map" }, "data": { "538": { "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, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540] }, { "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": [] }, { "entity": 531, "children": [] }, { "entity": 532, "children": [] }, { "entity": 533, "children": [] }, { "entity": 534, "children": [] }, { "entity": 535, "children": [] }, { "entity": 536, "children": [] }, { "entity": 537, "children": [] }, { "entity": 538, "children": [] }, { "entity": 539, "children": [] }, { "entity": 540, "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"}' }] } }, "538": { "json": { "id": 5, "value": [{ "name": "Play Activate Animation", "type": "play_animation", "jsonPayload": '{ "animation": "trigger" }' }, { "name": "Play Sound", "type": "play_sound", "jsonPayload": '{"src":"assets/builder/red_light_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": 5 } } } }, { "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" }] }] } }, "538": { "json": { "value": [{ "type": "on_click", "conditions": [], "actions": [{ "id": 5, "name": "Play Activate Animation" }, { "id": 5, "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": {} }, "531": { "json": {} }, "532": { "json": {} }, "534": { "json": {} }, "535": { "json": {} }, "536": { "json": {} }, "537": { "json": {} }, "538": { "json": {} }, "539": { "json": {} }, "540": { "json": {} }, "541": { "json": {} } } }, { "name": "cube-id", "jsonSchema": { "type": "object", "properties": {}, "serializationType": "map" }, "data": { "512": { "json": {} } } }] } }; // node_modules/@dcl/sdk/composite-provider.js var composites = []; @@ -38296,4 +38303,4 @@ long/index.js: * SPDX-License-Identifier: Apache-2.0 *) */ -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vbm9kZV9tb2R1bGVzL0Bwcm90b2J1ZmpzL2FzcHJvbWlzZS9pbmRleC5qcyIsICIuLi9ub2RlX21vZHVsZXMvQHByb3RvYnVmanMvYmFzZTY0L2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy9ldmVudGVtaXR0ZXIvaW5kZXguanMiLCAiLi4vbm9kZV9tb2R1bGVzL0Bwcm90b2J1ZmpzL2Zsb2F0L2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy9pbnF1aXJlL2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy91dGY4L2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy9wb29sL2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9wcm90b2J1ZmpzL3NyYy91dGlsL2xvbmdiaXRzLmpzIiwgIi4uL25vZGVfbW9kdWxlcy9wcm90b2J1ZmpzL3NyYy91dGlsL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biAgICAgICAgaW5kZXggICA9IDIsXHJcbiAgICAgICAgcGVuZGluZyA9IHRydWU7XHJcbiAgICB3aGlsZSAoaW5kZXggPCBhcmd1bWVudHMubGVuZ3RoKVxyXG4gICAgICAgIHBhcmFtc1tvZmZzZXQrK10gPSBhcmd1bWVudHNbaW5kZXgrK107XHJcbiAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24gZXhlY3V0b3IocmVzb2x2ZSwgcmVqZWN0KSB7XHJcbiAgICAgICAgcGFyYW1zW29mZnNldF0gPSBmdW5jdGlvbiBjYWxsYmFjayhlcnIvKiwgdmFyYXJncyAqLykge1xyXG4gICAgICAgICAgICBpZiAocGVuZGluZykge1xyXG4gICAgICAgICAgICAgICAgcGVuZGluZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgaWYgKGVycilcclxuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTtcclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJhbXMgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCAtIDEpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChvZmZzZXQgPCBwYXJhbXMubGVuZ3RoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXNbb2Zmc2V0KytdID0gYXJndW1lbnRzW29mZnNldF07XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZS5hcHBseShudWxsLCBwYXJhbXMpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBmbi5hcHBseShjdHggfHwgbnVsbCwgcGFyYW1zKTtcclxuICAgICAgICB9IGNhdGNoIChlcnIpIHtcclxuICAgICAgICAgICAgaWYgKHBlbmRpbmcpIHt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WFrO1xyXG4gICAgICAgICAgICBjYXNlIDE6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDRdO1xyXG4gICAgICAgICAgICAgICAgdCA9IChiICYgMTUpIDw8IDI7XHJcbiAgICAgICAgICAgICAgICBqID0gMjtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDI6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDZdO1xyXG4gICAgICAgICAgICAgICAgY2h1bmtbaSsrXSA9IGI2NFtiICYgNjNdO1xyXG4gICAgICAgICAgICAgICAgaiA9IDA7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGkgPiA4MTkxKSB7XHJcbiAgICAgICAgICAgIChwYXJ0cyB8fCAocGFydHMgPSBbXSkpLnB1c2goU3RyaW5nLmZyb21DaGFyQ29kZS5hcHBseShTdHJpbmcsIGNodW5rKSk7XHJcbiAgICAgICAgICAgIGkgPSAwO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIGlmIChqKSB7XHJcbiAgICAgICAgY2h1bmtbaSsrXSA9IGI2NFt0XTtcclxuICAgICAgICBjaHVua1tpKytdID0gNjE7XHJcbiAgICAgICAgaWYgKGogPT09IDEpXHJcbiAgICAgICAgICAgIGNodW5rW2krK10gPSA2MTtcclxuICAgIH1cclxuICAgIGlmIChwYXJ0cykge1xyXG4gICAgICAgIGlmIChpKVxyXG4gICAgICAgICAgICBwYXJ0cy5wdXNoKFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkoU3RyaW5nLCBjaHVuay5zbGljZSgwLCBpKSkpO1xyXG4gICAgICAgIHJldHVybiBwYXJ0cy5qb2luKFwiXCIpO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkoU3RyaW5nLCBjaHVuay5z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B0ID0gYztcclxuICAgICAgICAgICAgICAgIGogPSAxO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgMTpcclxuICAgICAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSB0IDw8IDIgfCAoYyAmIDQ4KSA+PiA0O1xyXG4gICAgICAgICAgICAgICAgdCA9IGM7XHJcbiAgICAgICAgICAgICAgICBqID0gMjtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDI6XHJcbiAgICAgICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gKHQgJiAxNSkgPDwgNCB8IChjICYgNjApID4+IDI7XHJcbiAgICAgICAgICAgICAgICB0ID0gYztcclxuICAgICAgICAgICAgICAgIGogPSAzO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgMzpcclxuICAgICAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSAodCAmIDMpIDw8IDYgfCBjO1xyXG4gICAgICAgICAgICAgICAgaiA9IDA7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICBpZiAoaiA9PT0gMSlcclxuICAgICAgICB0aHJvdyBFcnJvcihpbnZhbGlkRW5jb2RpbmcpO1xyXG4gICAgcmV0dXJuIG9mZnNldCAtIHN0YXJ0O1xyXG59O1xyXG5cclxuLyoqXHJcbiAqIFRlc3RzIGlmIHRoZSBzcGVjaWZpZWQgc3RyaW5nIGFwcGVhcnMgdG8gYmUgYmFzZTY0IGVuY29kZWQuXHJcbiAqIEBwYXJhbSB7c3RyaW5nfSBzdHJpbmcgU3RyaW5nIHRvIHRlc3RcclxuICogQHJldHVybnMge2Jvb2xlYW59IGB0cnVlYCBpZiBwcm9iYWJseSBiYXNlNjQgZW5jb2RlZCwgb3RoZXJ3aXNlIGZhbHNlXHJcbiAqL1xyXG5iYXNl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0gZjhiWzBdO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLndyaXRlRmxvYXRMRSA9IGxlID8gd3JpdGVGbG9hdF9mMzJfY3B5IDogd3JpdGVGbG9hdF9mMzJfcmV2O1xyXG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXHJcbiAgICAgICAgZXhwb3J0cy53cml0ZUZsb2F0QkUgPSBsZSA/IHdyaXRlRmxvYXRfZjMyX3JldiA6IHdyaXRlRmxvYXRfZjMyX2NweTtcclxuXHJcbiAgICAgICAgZnVuY3Rpb24gcmVhZEZsb2F0X2YzMl9jcHkoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzBdID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbMV0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzNdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICByZXR1cm4gZjMyWzBdO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gcmVhZEZsb2F0X2YzMl9yZXYoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzNdID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbMl0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4YlsxXSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzBdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICByZXR1cm4gZjMyWzBdO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdExFID0gbGUgPyByZWFkRmxv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VxyXG4gICAgICAgICAgICAgICAgPyBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgPyBOYU5cclxuICAgICAgICAgICAgICAgIDogc2lnbiAqIEluZmluaXR5XHJcbiAgICAgICAgICAgICAgICA6IGV4cG9uZW50ID09PSAwIC8vIGRlbm9ybWFsXHJcbiAgICAgICAgICAgICAgICA/IHNpZ24gKiAxLjQwMTI5ODQ2NDMyNDgxN2UtNDUgKiBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgOiBzaWduICogTWF0aC5wb3coMiwgZXhwb25lbnQgLSAxNTApICogKG1hbnRpc3NhICsgODM4ODYwOCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdExFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludExFKTtcclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdEJFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludEJFKTtcclxuXHJcbiAgICB9KSgpO1xyXG5cclxuICAgIC8vIGRvdWJsZTogdHlwZWQgYXJyYXlcclxuICAgIGlmICh0eXBlb2YgRmxvYXQ2NEFycmF5ICE9PSBcInVuZGVmaW5lZFwiKSAoZnVuY3Rpb24oKSB7XHJcblxyXG4gICAgICAgIHZhciBmNjQgPSBuZXcgRmxvYXQ2NEFycmF5KFstMF0pLFxyXG4gICAgICAgICAgICBmOGIgPSBuZXcgVWludDhBcnJheShmNjQuYnVmZmVyKSxcclxuICAgICAgICAgICAgbGUgID0gZjhiWzddID09PSAxMjg7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHdyaXRlRG91YmxlX2Y2NF9jcHkodmFsLCBidWYsIHBvcykge1xyXG4gICAgICAgICAgICBmNjRbMF0gPSB2YWw7XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgICAgXSA9IGY4YlswXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDFdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMl0gPSBmOGJbMl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAzXSA9IGY4YlszXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDRdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNV0gPSBmOGJbNV07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA2XSA9IGY4Yls2XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDddID0gZjhiWzddO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gd3JpdGVEb3VibGVfZjY0X3Jldih2YWwsIGJ1ZiwgcG9zKSB7XHJcbiAgICAgICAgICAgIGY2NFswXSA9IHZhbDtcclxuICAgICAgICAgICAgYnVmW3BvcyAgICBdID0gZjhiWzddO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMV0gPSBmOGJbNl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAyXSA9IGY4Yls1XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDNdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNF0gPSBmOGJbM107XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA1XSA9IGY4YlsyXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDZdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgN10gPSBmOGJbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVMRSA9IGxlID8gd3JpdGVEb3VibGVfZjY0X2NweSA6IHdyaXRlRG91YmxlX2Y2NF9yZXY7XHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlQkUgPSBsZSA/IHdyaXRlRG91YmxlX2Y2NF9yZXYgOiB3cml0ZURvdWJsZV9mNjRfY3B5O1xyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9jcHkoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzBdID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbMV0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzNdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbNF0gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzZdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbN10gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9yZXYoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzddID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbNl0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzRdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbM10gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzFdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbMF0gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3Rh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kzMTM0ODYyMzE1N2UrMzA4KSB7IC8vICstSW5maW5pdHlcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgMjE0NjQzNTA3MikgPj4+IDAsIGJ1ZiwgcG9zICsgb2ZmMSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgbWFudGlzc2E7XHJcbiAgICAgICAgICAgICAgICBpZiAodmFsIDwgMi4yMjUwNzM4NTg1MDcyMDE0ZS0zMDgpIHsgLy8gZGVub3JtYWxcclxuICAgICAgICAgICAgICAgICAgICBtYW50aXNzYSA9IHZhbCAvIDVlLTMyNDtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgPj4+IDAsIGJ1ZiwgcG9zICsgb2ZmMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgbWFudGlzc2EgLyA0Mjk0OTY3Mjk2KSA+Pj4gMCwgYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4cG9uZW50ID0gTWF0aC5mbG9vcihNYXRoLmxvZyh2YWwpIC8gTWF0aC5MTjIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChleHBvbmVudCA9PT0gMTAyNClcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXhwb25lbnQgPSAxMDIzO1xyXG4gICAgICAgICAgICAgICAgICAgIG1hbnRpc3NhID0gdmFsICogTWF0aC5wb3coMiwgLWV4cG9uZW50KTtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgKiA0NTAzNTk5NjI3MzcwNDk2ID4+PiAwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlVWludCgoc2lnbiA8PCAzMSB8IGV4cG9uZW50ICsgMTAyMyA8PCAyMCB8IG1hbnRpc3NhICogMTA0ODU3NiAmIDEwNDg1NzUpID4+PiAwLCBidWYsIHBvcyArIG9mZjEpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlTEUgPSB3cml0ZURvdWJsZV9pZWVlNzU0LmJpbmQobnVsbCwgd3JpdGVVaW50TEUsIDAsIDQpO1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVCRSA9IHdyaXRlRG91YmxlX2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRCRSwgNCwgMCk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlYWREb3VibGVfaWVlZTc1NChyZWFkVWludCwgb2ZmMCwgb2ZmMSwgYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgdmFyIGxvID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYwKSxcclxuICAgICAgICAgICAgICAgIGhpID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgdmFyIHNpZ24gPSAoaGkgPj4gMzEpICogMiArIDEsXHJcbiAgICAgICAgICAgICAgICBleHBvbmVudCA9IGhpID4+PiAyMCAmIDIwNDcsXHJcbiAgICAgICAgICAgICAgICBtYW50aXNzYSA9IDQyOTQ5NjcyOTYgKiAoaGkgJiAxMDQ4NTc1KSArIGxvO1xyXG4gICAgICAgICAgICByZXR1cm4gZXhwb25lbnQgPT09IDIwNDdcclxuICAgICAgICAgICAgICAgID8gbWFudGlzc2FcclxuICAgICAgICAgICAgICAgID8gTmFOXHJcbiAgICAgICAgICAgICAgICA6IHNpZ24gKiBJbmZpbml0eVxyXG4gICAgICAgICAgICAgICAgOiBleHBvbmVudCA9PT0gMCAvLyBkZW5vcm1hbF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cGFyYW0ge251bWJlcn0gb2Zmc2V0IERlc3RpbmF0aW9uIG9mZnNldFxyXG4gKiBAcmV0dXJucyB7bnVtYmVyfSBCeXRlcyB3cml0dGVuXHJcbiAqL1xyXG51dGY4LndyaXRlID0gZnVuY3Rpb24gdXRmOF93cml0ZShzdHJpbmcsIGJ1ZmZlciwgb2Zmc2V0KSB7XHJcbiAgICB2YXIgc3RhcnQgPSBvZmZzZXQsXHJcbiAgICAgICAgYzEsIC8vIGNoYXJhY3RlciAxXHJcbiAgICAgICAgYzI7IC8vIGNoYXJhY3RlciAyXHJcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN0cmluZy5sZW5ndGg7ICsraSkge1xyXG4gICAgICAgIGMxID0gc3RyaW5nLmNoYXJDb2RlQXQoaSk7XHJcbiAgICAgICAgaWYgKGMxIDwgMTI4KSB7XHJcbiAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSBjMTtcclxuICAgICAgICB9IGVsc2UgaWYgKGMxIDwgMjA0OCkge1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gNiAgICAgICB8IDE5MjtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxICAgICAgICYgNjMgfCAxMjg7XHJcbiAgICAgICAgfSBlbHNlIGlmICgoYzEgJiAweEZDMDApID09PSAweEQ4MDAgJiYgKChjMiA9IHN0cmluZy5jaGFyQ29kZUF0KGkgKyAxKSkgJiAweEZDMDApID09PSAweERDMDApIHtcclxuICAgICAgICAgICAgYzEgPSAweDEwMDAwICsgKChjMSAmIDB4MDNGRikgPDwgMTApICsgKGMyICYgMHgwM0ZGKTtcclxuICAgICAgICAgICAgKytpO1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gMTggICAgICB8IDI0MDtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxID4+IDEyICYgNjMgfCAxMjg7XHJcbiAgICAg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gIHZhbHVlOiBDdXN0b21FcnJvcixcbiAgICAgICAgICAgIHdyaXRhYmxlOiB0cnVlLFxuICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWUsXG4gICAgICAgIH0sXG4gICAgICAgIG5hbWU6IHtcbiAgICAgICAgICAgIGdldDogZnVuY3Rpb24gZ2V0KCkgeyByZXR1cm4gbmFtZTsgfSxcbiAgICAgICAgICAgIHNldDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAvLyBjb25maWd1cmFibGU6IGZhbHNlIHdvdWxkIGFjY3VyYXRlbHkgcHJlc2VydmUgdGhlIGJlaGF2aW9yIG9mXG4gICAgICAgICAgICAvLyB0aGUgb3JpZ2luYWwsIGJ1dCBJJ20gZ3Vlc3NpbmcgdGhhdCB3YXMgbm90IGludGVudGlvbmFsLlxuICAgICAgICAgICAgLy8gRm9yIGFuIGFjdHVhbCBlcnJvciBzdWJjbGFzcywgdGhpcyBwcm9wZXJ0eSB3b3VsZFxuICAgICAgICAgICAgLy8gYmUgY29uZmlndXJhYmxlLlxuICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgICB0b1N0cmluZzoge1xuICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIHZhbHVlKCkgeyByZXR1cm4gdGhpcy5uYW1lICsgXCI6IFwiICsgdGhpcy5tZXNzYWdlOyB9LFxuICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgICAgfSxcbiAgICB9KTtcblxuICAgIHJldHVybiBDdXN0b21FcnJvcjtcbn1cblxudXRpbC5uZXdFcnJvciA9IG5ld0Vycm9yO1xuXG4vKipcbiAqIENvbnN0cn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y5sbyB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3KSA+Pj4gMDtcbiAgICAgICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgICAgICByZXR1cm4gYml0cztcbiAgICAgICAgfVxuICAgICAgICAvLyA0dGhcbiAgICAgICAgYml0cy5sbyA9IChiaXRzLmxvIHwgKHRoaXMuYnVmW3RoaXMucG9zKytdICYgMTI3KSA8PCBpICogNykgPj4+IDA7XG4gICAgICAgIHJldHVybiBiaXRzO1xuICAgIH1cbiAgICBpZiAodGhpcy5sZW4gLSB0aGlzLnBvcyA+IDQpIHsgLy8gZmFzdCByb3V0ZSAoaGkpXG4gICAgICAgIGZvciAoOyBpIDwgNTsgKytpKSB7XG4gICAgICAgICAgICAvLyA2dGguLjEwdGhcbiAgICAgICAgICAgIGJpdHMuaGkgPSAoYml0cy5oaSB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3ICsgMykgPj4+IDA7XG4gICAgICAgICAgICBpZiAodGhpcy5idWZbdGhpcy5wb3MrK10gPCAxMjgpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGJpdHM7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKDsgaSA8IDU7ICsraSkge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICAgICAgLy8gNnRoLi4xMHRoXG4gICAgICAgICAgICBiaXRzLmhpID0gKGJpdHMuaGkgfCAodGhpcy5idWZbdGhpcy5wb3NdICYgMTI3KSA8PCBpICogNyArIDMpID4+PiAwO1xuICAgICAgICAgICAgaWYgKHRoaXMuYnVmW3RoaXMucG9zKyt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QgbXVzdCBiZSBzcGVjaWZpZWRcIik7XG5cbiAgICB2YXIgc2VsZiA9IHRoaXM7XG4gICAgaWYgKCFjYWxsYmFjaylcbiAgICAgICAgcmV0dXJuIHV0aWwuYXNQcm9taXNlKHJwY0NhbGwsIHNlbGYsIG1ldGhvZCwgcmVxdWVzdEN0b3IsIHJlc3BvbnNlQ3RvciwgcmVxdWVzdCk7XG5cbiAgICBpZiAoIXNlbGYucnBjSW1wbCkge1xuICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkgeyBjYWxsYmFjayhFcnJvcihcImFscmVhZHkgZW5kZWRcIikpOyB9LCAwKTtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICB0cnkge1xuICAgICAgICByZXR1cm4gc2VsZi5ycGNJbXBsKFxuICAgICAgICAgICAgbWV0aG9kLFxuICAgICAgICAgICAgcmVxdWVzdEN0b3Jbc2VsZi5yZXF1ZXN0RGVsaW1pdGVkID8gXCJlbmNvZGVEZWxpbWl0ZWRcIiA6IFwiZW5jb2RlXCJdKHJlcXVlc3QpLmZpbmlzaCgpLFxuICAgICAgICAgICAgZnVuY3Rpb24gcnBjQ2FsbGJhY2soZXJyLCByZXNwb25zZSkge1xuXG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJlcnJvclwiLCBlcnIsIG1ldGhvZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhlcnIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVuZCgvKiBlbmRlZEJ5UlBDICovIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghKHJlc3BvbnNlIGluc3RhbmNlb2YgcmVzcG9uc2VDdG9yKSkge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgPSByZXNwb25zZUN0b3Jbc2VsZi5yZXNwb25zZURlbGltaXRlZCA/IFwiZGVjb2RlRGVsaW1pdGVkXCIgOiBcImRlY29kZVwiXShyZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5lbWl0KFwiZXJyb3JcIiwgZXJyLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGVycik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJkYXRhXCIsIHJlc3BvbnNlLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhudWxsLCByZXNwb25zZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG4gICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIHNlbGYuZW1pdChcImVycm9yXCIsIGVyciwgbWV0aG9kKTtcbiAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHsgY2FsbGJhY2soZXJyKTsgfSwgMCk7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxufTtcblxuLyoqXG4gKiBFbmRzIHRoaXMgc2VydmljZSBhbmQgZW1pdHMgdGhlIGBlbmRgIGV2ZW50LlxuICogQHBhcmFtIHtib29sZWFufSBbZW5kZWRCeVJQQz1mYWxzZV0gV2hldGhlciB0aGUgc2VydmljZSBoYXMgYmVlbiBlbmRlZCBieSB0aGUgUlBDIGltcGxlbWVudGF0aW9uLlxuICogQHJldHVybnMge3JwYy5TZXJ2aWNlfSBgdGhpc2BcbiAqL1xuU2VydmljZS5wcm90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pbnN0ZWFkPycpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBjb250ZXh0LlByb3ZpZGVyO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfUHJvdmlkZXIpIHtcbiAgICAgICAgICBjb250ZXh0LlByb3ZpZGVyID0gX1Byb3ZpZGVyO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgX2N1cnJlbnRWYWx1ZToge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fY3VycmVudFZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlKSB7XG4gICAgICAgICAgY29udGV4dC5fY3VycmVudFZhbHVlID0gX2N1cnJlbnRWYWx1ZTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF9jdXJyZW50VmFsdWUyOiB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiBjb250ZXh0Ll9jdXJyZW50VmFsdWUyO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlMikge1xuICAgICAgICAgIGNvbnRleHQuX2N1cnJlbnRWYWx1ZTIgPSBfY3VycmVudFZhbHVlMjtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF90aHJlYWRDb3VudDoge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fdGhyZWFkQ291bnQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKF90aHJlYWRDb3VudCkge1xuICAgICAgICAgIGNvbnRleHQuX3RocmVhZENvdW50ID0gX3RocmVhZENvdW50O1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgQ29uc3VtZXI6IHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgaWYgKCFoYXNXYXJuZWRBYm91dFVzaW5nTmVzdGVkQ29udGV4dENvbnN1bWVycykge1xuICAgICAgICAgICAgaGFzV2FybmVkQWJvdXRVc2luZ05lc3RlZENvbnRleHRDb25zdW1lcnMgPSB0cnVlO1xuXG4gICAgICAgICAgICBlcnJvcignUmVuZGVyaW5nIDxDb250ZXh0LkNvbnN1bWVyLkNvbnN1bWVyPiBpcyBub3Qgc3VwcG9ydGVkIGFuZCB3aWxsIGJlIHJlbW92ZWQgaW4gJyArICdhIGZ1dHVyZSBtYWpvciByZWxlYXNlLiBEaWQgeW91IG1lYW4gdG8gcmVuZGVyIDxDb250ZXh0LkNvbnN1bWVyPiBpbnN0ZWFkPycpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBjb250ZXh0LkNvbnN1bWVyO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgZGlzcGxheU5hbWU6IHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgcmV0dXJuIGNvbnRleHQuZGlzcGxheU5hbWU7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKGRpc3BsYXlOYW1lKSB7XG4gICAgICAgICAgaWYgKCFoYXNXYXJuZWRBYm91dERpc3BsYXlOYW1lT25Db25zdW1lcikge1xuICAgICAgICAgICAgd2FybignU2V0dGluZyBgZGlzcGxheU5hbWVgIG9uIENvbnRleHQuQ29uc3VtZXIgaGFzIG5vIGVmZmVjdC4gJyArIFwiWW91IHNob3VsZCBzZXQgaXQgZGlyZWN0bHkgb24gdGhlIGNvbnRleHQgd2l0aCBDb250ZXh0LmRpc3BsYXlOYW1lID0gJyVzJy5cIiwgZGlzcGxheU5hbWUpO1xuXG4gICAgICAgICAgICBoYXNXYXJuZWRBYm91dERpc3BsYXlOYW1lT25Db25zdW1lciA9IHRydWU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgIC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cgKi9cbiAgICB9XG5cbiAgICBkaXNhYmxlZERlcHRoKys7XG4gIH1cbn1cbmZ1bmN0aW9uIHJlZW5hYmxlTG9ncygpIHtcbiAge1xuICAgIGRpc2FibGVkRGVwdGgtLTtcblxuICAgIGlmIChkaXNhYmxlZERlcHRoID09PSAwKSB7XG4gICAgICAvKiBlc2xpbnQtZGlzYWJsZSByZWFjdC1pbnRlcm5hbC9uby1wcm9kdWN0aW9uLWxvZ2dpbmcgKi9cbiAgICAgIHZhciBwcm9wcyA9IHtcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICB3cml0YWJsZTogdHJ1ZVxuICAgICAgfTsgLy8gJEZsb3dGaXhNZSBGbG93IHRoaW5rcyBjb25zb2xlIGlzIGltbXV0YWJsZS5cblxuICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnRpZXMoY29uc29sZSwge1xuICAgICAgICBsb2c6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkxvZ1xuICAgICAgICB9KSxcbiAgICAgICAgaW5mbzogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2SW5mb1xuICAgICAgICB9KSxcbiAgICAgICAgd2FybjogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2V2FyblxuICAgICAgICB9KSxcbiAgICAgICAgZXJyb3I6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkVycm9yXG4gICAgICAgIH0pLFxuICAgICAgICBncm91cDogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2R3JvdXBcbiAgICAgICAgfSksXG4gICAgICAgIGdyb3VwQ29sbGFwc2VkOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZHcm91cENvbG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PT09IDApIHtcbiAgICAgICAgICAgIC8vIE5vIGFkZGl0aW9uYWwgd29yayB3YXMgc2NoZWR1bGVkLiBGaW5pc2guXG4gICAgICAgICAgICBSZWFjdEN1cnJlbnRBY3RRdWV1ZS5jdXJyZW50ID0gbnVsbDtcbiAgICAgICAgICAgIHJlc29sdmUocmV0dXJuVmFsdWUpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvLyBLZWVwIGZsdXNoaW5nIHdvcmsgdW50aWwgdGhlcmUncyBub25lIGxlZnQuXG4gICAgICAgICAgICByZWN1cnNpdmVseUZsdXNoQXN5bmNBY3RXb3JrKHJldHVyblZhbHVlLCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICByZXNvbHZlKHJldHVyblZhbHVlKTtcbiAgICB9XG4gIH1cbn1cblxudmFyIGlzRmx1c2hpbmcgPSBmYWxzZTtcblxuZnVuY3Rpb24gZmx1c2hBY3RRdWV1ZShxdWV1ZSkge1xuICB7XG4gICAgaWYgKCFpc0ZsdXNoaW5nKSB7XG4gICAgICAvLyBQcmV2ZW50IHJlLWVudHJhbmNlLlxuICAgICAgaXNGbHVzaGluZyA9IHRydWU7XG4gICAgICB2YXIgaSA9IDA7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIGZvciAoOyBpIDwgcXVldWUubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICB2YXIgY2FsbGJhY2sgPSBxdWV1ZVtpXTtcblxuICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgIGNhbGxiYWNrID0gY2FsbGJhY2sodHJ1ZSk7XG4gICAgICAgICAgfSB3aGlsZSAoY2FsbGJhY2sgIT09IG51bGwpO1xuICAgICAgICB9XG5cbiAgICAgICAgcXVldWUubGVuZ3RoID0gMDtcbiA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HVzZWQgYnkgUmVhY3QgRGV2IFRvb2xzLlxudmFyIE5vRmxhZ3MgPVxuLyogICAgICAgICAgICAgICAgICAgICAgKi9cbjA7XG52YXIgUGVyZm9ybWVkV29yayA9XG4vKiAgICAgICAgICAgICAgICAqL1xuMTsgLy8gWW91IGNhbiBjaGFuZ2UgdGhlIHJlc3QgKGFuZCBhZGQgbW9yZSkuXG5cbnZhciBQbGFjZW1lbnQgPVxuLyogICAgICAgICAgICAgICAgICAgICovXG4yO1xudmFyIFVwZGF0ZSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQ7XG52YXIgQ2hpbGREZWxldGlvbiA9XG4vKiAgICAgICAgICAgICAgICAqL1xuMTY7XG52YXIgQ29udGVudFJlc2V0ID1cbi8qICAgICAgICAgICAgICAgICAqL1xuMzI7XG52YXIgQ2FsbGJhY2sgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuNjQ7XG52YXIgRGlkQ2FwdHVyZSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuMTI4O1xudmFyIEZvcmNlQ2xpZW50UmVuZGVyID1cbi8qICAgICAgICAgICAgKi9cbjI1NjtcbnZhciBSZWYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICovXG41MTI7XG52YXIgU25hcHNob3QgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBQYXNzaXZlID1cbi8qICAgICAgICAgICAgICAgICAgICAgICovXG4yMDQ4O1xudmFyIEh5ZHJhdGluZyA9XG4vKiAgICAgICAgICAgICAgICAgICAgKi9cbjQwOTY7XG52YXIgVmlzaWJpbGl0eSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBTdG9yZUNvbnNpc3RlbmN5ID1cbi8qICAgICAgICAgICAgICovXG4xNjM4NDtcbnZhciBMaWZlY3ljbGVFZmZlY3RNYXNrID0gUGFzc2l2ZSB8IFVwZGF0ZSB8IENhbGxiYWNrIHwgUmVmI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oaWxkID09PSBhKSB7XG4gICAgICAgICAgZGlkRmluZENoaWxkID0gdHJ1ZTtcbiAgICAgICAgICBhID0gcGFyZW50QTtcbiAgICAgICAgICBiID0gcGFyZW50QjtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChfY2hpbGQgPT09IGIpIHtcbiAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgIGIgPSBwYXJlbnRBO1xuICAgICAgICAgIGEgPSBwYXJlbnRCO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICB9XG5cbiAgICAgIGlmICghZGlkRmluZENoaWxkKSB7XG4gICAgICAgIC8vIFNlYXJjaCBwYXJlbnQgQidzIGNoaWxkIHNldFxuICAgICAgICBfY2hpbGQgPSBwYXJlbnRCLmNoaWxkO1xuXG4gICAgICAgIHdoaWxlIChfY2hpbGQpIHtcbiAgICAgICAgICBpZiAoX2NoaWxkID09PSBhKSB7XG4gICAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgICAgYSA9IHBhcmVudEI7XG4gICAgICAgICAgICBiID0gcGFyZW50QTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChfY2hpbGQgPT09IGIpIHtcbiAgICAgICAgICAgIGRpZEZpbmRDaGlsZCA9IHRydWU7XG4gICAgICAgICAgICBiID0gcGFyZW50QjtcbiAgICAgICAgICAgIGEgPSBwYXJlbnRBO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWRpZEZpbmRDaGlsZCkge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ2hpbGQgd2FzIG5vdCBm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OiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZMb2dcbiAgICAgICAgfSksXG4gICAgICAgIGluZm86IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkluZm9cbiAgICAgICAgfSksXG4gICAgICAgIHdhcm46IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldldhcm5cbiAgICAgICAgfSksXG4gICAgICAgIGVycm9yOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZFcnJvclxuICAgICAgICB9KSxcbiAgICAgICAgZ3JvdXA6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkdyb3VwXG4gICAgICAgIH0pLFxuICAgICAgICBncm91cENvbGxhcHNlZDogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2R3JvdXBDb2xsYXBzZWRcbiAgICAgICAgfSksXG4gICAgICAgIGdyb3VwRW5kOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZHcm91cEVuZFxuICAgICAgICB9KVxuICAgICAgfSk7XG4gICAgICAvKiBlc2xpbnQtZW5hYmxlIHJlYWN0LWludGVybmFsL25vLXByb2R1Y3Rpb24tbG9nZ2luZyAqL1xuICAgIH1cblxuICAgIGlmIChkaXNhYmxlZERlcHRoIDwgMCkge1xuICAgICAgZXJyb3IoJ2Rpc2FibGVkRGVwdGggZmVsbCBiZWxvdyB6ZXJvLiAnICsgJ1RoaXMgaXMgYSBidWcgaW4gUmVhY3QuIFBsZWFzZSBmaWxlIGFuIGlzc3VlLicpO1xuICAgIH1cbiAgfVxufVxuXG52YXIgUmVhY3RDdXJyZW50RGlzcGF0Y2hlciA9IFJlYWN0U2hhcmVkSW50ZXJuYWxzLlJlYWN0Q3VycmVudERpc3BhdGNoZXI7XG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dGFjayBtb3JlIHJlYWRhYmxlLlxuXG5cbiAgICAgICAgICAgICAgICBpZiAoZm4uZGlzcGxheU5hbWUgJiYgX2ZyYW1lLmluY2x1ZGVzKCc8YW5vbnltb3VzPicpKSB7XG4gICAgICAgICAgICAgICAgICBfZnJhbWUgPSBfZnJhbWUucmVwbGFjZSgnPGFub255bW91cz4nLCBmbi5kaXNwbGF5TmFtZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBmbiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRGcmFtZUNhY2hlLnNldChmbiwgX2ZyYW1lKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IC8vIFJldHVybiB0aGUgbGluZSB3ZSBmb3VuZC5cblxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIF9mcmFtZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAocyA+PSAxICYmIGMgPj0gMCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0gZmluYWxseSB7XG4gICAgcmVlbnRyeSA9IGZhbHNlO1xuXG4gICAge1xuICAgICAgUmVhY3RDdXJyZW50RGlzcGF0Y2hlci5jdXJyZW50ID0gcHJldmlvdXNEaXNwYXRjaGVyO1xuICAgICAgcmVlbmFibGVMb2dzKCk7XG4gICAgfVxuXG4gICAgRXJyb3IucHJlcGFyZVN0YWNrVHJhY2UgPSBwcmV2aW91c1ByZXBhcmVTdGFja1RyYWNlO1xuICB9IC8vIEZhbGxiYWNrIHRvIGp1c3QgdXNpbmcgdGhlIG5hbWUgaWYgd2UgY291bGRuJ3QgbWFrZSBpdCB0aHJvdy5cblxuXG4gIHZhciBuYW1lID0gZm4gPyBmbi5kaXNwbGF5TmFtZSB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gICAgICB2YXIgY29tcG9uZW50TmFtZSA9IGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIoZmliZXIpIHx8ICdVbmtub3duJztcblxuICAgICAgICBpZiAoIXdhcm5lZEFib3V0TWlzc2luZ0dldENoaWxkQ29udGV4dFtjb21wb25lbnROYW1lXSkge1xuICAgICAgICAgIHdhcm5lZEFib3V0TWlzc2luZ0dldENoaWxkQ29udGV4dFtjb21wb25lbnROYW1lXSA9IHRydWU7XG5cbiAgICAgICAgICBlcnJvcignJXMuY2hpbGRDb250ZXh0VHlwZXMgaXMgc3BlY2lmaWVkIGJ1dCB0aGVyZSBpcyBubyBnZXRDaGlsZENvbnRleHQoKSBtZXRob2QgJyArICdvbiB0aGUgaW5zdGFuY2UuIFlvdSBjYW4gZWl0aGVyIGRlZmluZSBnZXRDaGlsZENvbnRleHQoKSBvbiAlcyBvciByZW1vdmUgJyArICdjaGlsZENvbnRleHRUeXBlcyBmcm9tIGl0LicsIGNvbXBvbmVudE5hbWUsIGNvbXBvbmVudE5hbWUpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBwYXJlbnRDb250ZXh0O1xuICAgIH1cblxuICAgIHZhciBjaGlsZENvbnRleHQgPSBpbnN0YW5jZS5nZXRDaGlsZENvbnRleHQoKTtcblxuICAgIGZvciAodmFyIGNvbnRleHRLZXkgaW4gY2hpbGRDb250ZXh0KSB7XG4gICAgICBpZiAoIShjb250ZXh0S2V5IGluIGNoaWxkQ29udGV4dFR5cGVzKSkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoKGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIoZmliZXIpIHx8ICdVbmtub3duJykgKyBcIi5nZXRDaGlsZENvbnRleHQoKToga2V5IFxcXCJcIiArIGNvbnRleHRLZXkgKyBcIlxcXCIgaXMgbm90IGRlZmluZWQgaW4gY2hpbGRDb250ZXh0VHlwZXMuXCIpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHtcbiAg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iB8IDApIHwgMDtcbn1cblxuLy8gSWYgdGhvc2UgdmFsdWVzIGFyZSBjaGFuZ2VkIHRoYXQgcGFja2FnZSBzaG91bGQgYmUgcmVidWlsdCBhbmQgcmVkZXBsb3llZC5cblxudmFyIFRvdGFsTGFuZXMgPSAzMTtcbnZhciBOb0xhbmVzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjA7XG52YXIgTm9MYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuMDtcbnZhciBTeW5jTGFuZSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4xO1xudmFyIElucHV0Q29udGludW91c0h5ZHJhdGlvbkxhbmUgPVxuLyogICAgKi9cbjI7XG52YXIgSW5wdXRDb250aW51b3VzTGFuZSA9XG4vKiAgICAgICAgICAgICAqL1xuNDtcbnZhciBEZWZhdWx0SHlkcmF0aW9uTGFuZSA9XG4vKiAgICAgICAgICAgICovXG44O1xudmFyIERlZmF1bHRMYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgKi9cbjE2O1xudmFyIFRyYW5zaXRpb25IeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICAgICAgICovXG4zMjtcbnZhciBUcmFuc2l0aW9uTGFuZXMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG40MTk0MjQwO1xudmFyIFRyYW5zaXRpb25MYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG42NDtcbnZhciBUcmFuc2l0aW9uTGFuZTIgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTI4O1xudmFyIFRyYW5zaXRpb25MYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4yNTY7XG52YXIgVHJhbnNpdGlvbkxhbmU0ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUxMjtcbnZhciBUcmFuc2l0aW9uTGFuZTUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBUcmFuc2l0aW9uTGFuZTYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA0ODtcbnZhciBUcmFuc2l0aW9uTGFuZTcgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuNDA5NjtcbnZhciBUcmFuc2l0aW9uTGFuZTggPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBUcmFuc2l0aW9uTGFuZTkgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTYzODQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxMCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjMyNzY4O1xudmFyIFRyYW5zaXRpb25MYW5lMTEgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG42NTUzNjtcbnZhciBUcmFuc2l0aW9uTGFuZTEyID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTMxMDcyO1xudmFyIFRyYW5zaXRpb25MYW5lMTMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4yNjIxNDQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxNCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUyNDI4ODtcbnZhciBUcmFuc2l0aW9uTGFuZTE1ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTA0ODU3NjtcbnZhciBUcmFuc2l0aW9uTGFuZTE2ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA5NzE1MjtcbnZhciBSZXRyeUxhbmVzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4xMzAwMjM0MjQ7XG52YXIgUmV0cnlMYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQxOTQzMDQ7XG52YXIgUmV0cnlMYW5lMiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjgzODg2MDg7XG52YX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B7XG4gICAgICB2YXIgZGlkRXJyb3IgPSAocm9vdC5jdXJyZW50LmZsYWdzICYgRGlkQ2FwdHVyZSkgPT09IERpZENhcHR1cmU7XG5cbiAgICAgIGlmIChlbmFibGVQcm9maWxlclRpbWVyKSB7XG4gICAgICAgIHZhciBzY2hlZHVsZXJQcmlvcml0eTtcblxuICAgICAgICBzd2l0Y2ggKGV2ZW50UHJpb3JpdHkpIHtcbiAgICAgICAgICBjYXNlIERpc2NyZXRlRXZlbnRQcmlvcml0eTpcbiAgICAgICAgICAgIHNjaGVkdWxlclByaW9yaXR5ID0gSW1tZWRpYXRlUHJpb3JpdHk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgQ29udGludW91c0V2ZW50UHJpb3JpdHk6XG4gICAgICAgICAgICBzY2hlZHVsZXJQcmlvcml0eSA9IFVzZXJCbG9ja2luZ1ByaW9yaXR5O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlIERlZmF1bHRFdmVudFByaW9yaXR5OlxuICAgICAgICAgICAgc2NoZWR1bGVyUHJpb3JpdHkgPSBOb3JtYWxQcmlvcml0eTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSBJZGxlRXZlbnRQcmlvcml0eTpcbiAgICAgICAgICAgIHNjaGVkdWxlclByaW9yaXR5ID0gSWRsZVByaW9yaXR5O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgc2NoZWR1bGVyUHJpb3JpdHkgPSBOb3JtYWxQcmlvcml0eTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5qZWN0ZWRIb29rLm9uQ29tbWl0RmliZXJSb290KHJlbmRlcmVySUQsIHJvb3QsIHNjaGVkdWxlclByaW9yaXR5LCBkaWRFcnJvcik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpbmplY3RlZEhvb2s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ROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdHlwZSwgcHJvcHMpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAgdmFyIHRleHQgPSBmaWJlci5wZW5kaW5nUHJvcHM7XG4gICAgICAgICAgICAgIGRpZE5vdEZpbmRIeWRyYXRhYmxlVGV4dEluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdGV4dCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVN1c3BlbnNlSW5zdGFuY2VXaXRoaW5Db250YWluZXIocGFyZW50Q29udGFpbmVyKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHBhcmVudFR5cGUgPSByZXR1cm5GaWJlci50eXBlO1xuICAgICAgICAgIHZhciBwYXJlbnRQcm9wcyA9IHJldHVybkZpYmVyLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgdmFyIHBhcmVudEluc3RhbmNlID0gcmV0dXJuRmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdHlwZSA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgICAgdmFyIF9wcm9wcyA9IGZpYmVyLnBlbmRpbmdQcm9wcztcbiAgICAgICAgICAgICAgICB2YXIgaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90eXBlLCBfcHJvcHMsIC8vIFRPRE86IERlbGV0ZSB0aGlzIGFyZ3VtZW50IHdoZW4gd2UgcmVtb3ZlIHRoZSBsZWdhY3kgcm9vdCBBUEkuXG4gICAgICAgICAgICAgICAgaXNDb25jdXJyZW50TW9kZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdGV4dCA9IGZpYmVyLnBlbmRpbmdQcm9wcztcblxuICAgICAgICAgICAgICAgIHZhciBfaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG5cbiAgICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90ZXh0LCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgICAgIF9pc0NvbmN1cnJlbnRNb2RlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVTdXNwZW5zZUluc3RhbmNlKHBhcmVudFR5cGUsIHBhcmVudFByb3BzLCBwYXJlbnRJbnN0YW5jZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHN1c3BlbnNlU3RhdGUgPSByZXR1cm5GaWJlci5tZW1vaXplZFN0YXRlO1xuICAgICAgICAgIHZhciBfcGFyZW50SW5zdGFuY2UgPSBzdXNwZW5zZVN0YXRlLmRlaHlkcmF0ZWQ7XG4gICAgICAgICAgaWYgKF9wYXJlbnRJbnN0YW5jZSAhPT0gbnVsbCkgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAgdmFyIF90eXBlMiA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgIHZhciBfcHJvcHMyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UsIF90eXBlMiwgX3Byb3BzMik7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICAgICAgICB2YXIgX3RleHQyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZVdpdGhpblN1c3BlbnNlSW5zdGFuY2UoX3BhcmVudEluc3RhbmNlLCBfdGV4dDIpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBTdXNwZW5zZUNvbXBvbmVudDpcbiAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJh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KSB7XG4gIHN3aXRjaCAodXBkYXRlLnRhZykge1xuICAgIGNhc2UgUmVwbGFjZVN0YXRlOlxuICAgICAge1xuICAgICAgICB2YXIgcGF5bG9hZCA9IHVwZGF0ZS5wYXlsb2FkO1xuXG4gICAgICAgIGlmICh0eXBlb2YgcGF5bG9hZCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgIC8vIFVwZGF0ZXIgZnVuY3Rpb25cbiAgICAgICAgICB7XG4gICAgICAgICAgICBlbnRlckRpc2FsbG93ZWRDb250ZXh0UmVhZEluREVWKCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIG5leHRTdGF0ZSA9IHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKCB3b3JrSW5Qcm9ncmVzcy5tb2RlICYgU3RyaWN0TGVnYWN5TW9kZSkge1xuICAgICAgICAgICAgICBzZXRJc1N0cmljdE1vZGVGb3JEZXZ0b29scyh0cnVlKTtcblxuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIHNldElzU3RyaWN0TW9kZUZvckRldnRvb2xzKGZhbHNlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleGl0RGlzYWxsb3dlZENvbnRleHRSZWFkSW5ERVYoKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gbmV4dFN0YXRlO1xuICAgICAgICB9IC8vIFN0YXRlIG9iamVjdFxuXG5cbiAgICAgICAgcmV0dXJuIHBheWxvYWQ7XG4gICAgICB9XG5cbiAgICBjYXNlIENhcHR1cmVVcGRhdGU6XG4gICAgICB7XG4gICAgICAgIHdv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lZC5yZWYgPSBjb2VyY2VSZWYocmV0dXJuRmliZXIsIG51bGwsIG5ld0NoaWxkKTtcbiAgICAgICAgICAgIF9jcmVhdGVkLnJldHVybiA9IHJldHVybkZpYmVyO1xuICAgICAgICAgICAgcmV0dXJuIF9jcmVhdGVkO1xuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX1BPUlRBTF9UWVBFOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBfY3JlYXRlZDIgPSBjcmVhdGVGaWJlckZyb21Qb3J0YWwobmV3Q2hpbGQsIHJldHVybkZpYmVyLm1vZGUsIGxhbmVzKTtcblxuICAgICAgICAgICAgX2NyZWF0ZWQyLnJldHVybiA9IHJldHVybkZpYmVyO1xuICAgICAgICAgICAgcmV0dXJuIF9jcmVhdGVkMjtcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBSRUFDVF9MQVpZX1RZUEU6XG4gICAgICAgICAge1xuICAgICAgICAgICAgdmFyIHBheWxvYWQgPSBuZXdDaGlsZC5fcGF5bG9hZDtcbiAgICAgICAgICAgIHZhciBpbml0ID0gbmV3Q2hpbGQuX2luaXQ7XG4gICAgICAgICAgICByZXR1cm4gY3JlYXRlQ2hpbGQocmV0dXJuRmliZXIsIGluaXQocGF5bG9hZCksIGxhbmVzKTtcbiAgICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChpc0FycmF5KG5ld0NoaWxkKSB8fCBnZXRJdGVyYXRvckZuKG5ld0NoaWxkKSkge1xuICAgICAgICB2YXIgX2NyZWF0ZWQzID0gY3JlYXRlRmliZXJGcm9tRnJhZ21lbnQobmV3Q2hpbGQsIHJldHVybkZpYmVyLm1vZGUsIGxhbmVzLCBudWxsKTtcblxuICAgICAgICBfY3JlYXRlZDMucmV0dXJuID0gcmV0dXJuRmliZXI7XG4gICAgICAgIHJldHVybiBfY3JlYXRlZDM7XG4gICAgICB9XG5cbiAgICAgIHRocm93T25JbnZhbGlkT2JqZWN0VHl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V3Q2hpbGQgIT09IG51bGwpIHtcbiAgICAgIHN3aXRjaCAobmV3Q2hpbGQuJCR0eXBlb2YpIHtcbiAgICAgICAgY2FzZSBSRUFDVF9FTEVNRU5UX1RZUEU6XG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKG5ld0NoaWxkLmtleSA9PT0ga2V5KSB7XG4gICAgICAgICAgICAgIHJldHVybiB1cGRhdGVFbGVtZW50KHJldHVybkZpYmVyLCBvbGRGaWJlciwgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX1BPUlRBTF9UWVBFOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmIChuZXdDaGlsZC5rZXkgPT09IGtleSkge1xuICAgICAgICAgICAgICByZXR1cm4gdXBkYXRlUG9ydGFsKHJldHVybkZpYmVyLCBvbGRGaWJlciwgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgcGF5bG9hZCA9IG5ld0NoaWxkLl9wYXlsb2FkO1xuICAgICAgICAgICAgdmFyIGluaXQgPSBuZXdDaGlsZC5faW5pdDtcbiAgICAgICAgICAgIHJldHVybiB1cGRhdGVTbG90KHJldHVybkZpYmVyLCBvbGRGaWJlciwgaW5pdChwYXlsb2FkKSwgbGFuZXMpO1xuICAgICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGlzQXJyYXkobmV3Q2hpbGQpIHx8IGdldEl0ZXJhdG9yRm4obmV3Q2hpbGQpKSB7XG4gICAgICAgIGlmIChrZXkgIT09IG51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9IGNoaWxkLmtleTtcblxuICAgICAgICAgIGlmICh0eXBlb2Yga2V5ICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGtub3duS2V5cyA9PT0gbnVsbCkge1xuICAgICAgICAgICAga25vd25LZXlzID0gbmV3IFNldCgpO1xuICAgICAgICAgICAga25vd25LZXlzLmFkZChrZXkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKCFrbm93bktleXMuaGFzKGtleSkpIHtcbiAgICAgICAgICAgIGtub3duS2V5cy5hZGQoa2V5KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGVycm9yKCdFbmNvdW50ZXJlZCB0d28gY2hpbGRyZW4gd2l0aCB0aGUgc2FtZSBrZXksIGAlc2AuICcgKyAnS2V5cyBzaG91bGQgYmUgdW5pcXVlIHNvIHRoYXQgY29tcG9uZW50cyBtYWludGFpbiB0aGVpciBpZGVudGl0eSAnICsgJ2Fjcm9zcyB1cGRhdGVzLiBOb24tdW5pcXVlIGtleXMgbWF5IGNhdXNlIGNoaWxkcmVuIHRvIGJlICcgKyAnZHVwbGljYXRlZCBhbmQvb3Igb21pdHRlZCBcdTIwMTQgdGhlIGJlaGF2aW9yIGlzIHVuc3VwcG9ydGVkIGFuZCAnICsgJ2NvdWxkIGNoYW5nZSBpbiBhIGZ1dHVyZSB2ZXJzaW9uLicsIGtleSk7XG5cbiAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAgICB2YXIgcGF5bG9hZCA9IGNoaWxkLl9wYXlsb2FkO1xuICAgICAgICAgIHZhciBpbml0ID0gY2hpbGQuX2luaXQ7XG4gICAgICAgICAgd2Fybk9uSW52YWxpZEtleShpbml0KHBheWxvYWQpLCBrbm93bktleXMsIHJldHVybkZpYmVyKTtc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NlIGlmIChub2RlLmNoaWxkICE9PSBudWxsKSB7XG4gICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICBub2RlID0gbm9kZS5jaGlsZDtcbiAgICAgIGNvbnRpbnVlO1xuICAgIH1cblxuICAgIGlmIChub2RlID09PSByb3cpIHtcbiAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgIGlmIChub2RlLnJldHVybiA9PT0gbnVsbCB8fCBub2RlLnJldHVybiA9PT0gcm93KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICBub2RlID0gbm9kZS5yZXR1cm47XG4gICAgfVxuXG4gICAgbm9kZS5zaWJsaW5nLnJldHVybiA9IG5vZGUucmV0dXJuO1xuICAgIG5vZGUgPSBub2RlLnNpYmxpbmc7XG4gIH1cblxuICByZXR1cm4gbnVsbDtcbn1cblxudmFyIE5vRmxhZ3MkMSA9XG4vKiAgICovXG4wOyAvLyBSZXByZXNlbnRzIHdoZXRoZXIgZWZmZWN0IHNob3VsZCBmaXJlLlxuXG52YXIgSGFzRWZmZWN0ID1cbi8qICovXG4xOyAvLyBSZXByZXNlbnRzIHRoZSBwaGFzZSBpbiB3aGljaCB0aGUgZWZmZWN0IChub3QgdGhlIGNsZWFuLXVwKSBmaXJlcy5cblxudmFyIEluc2VydGlvbiA9XG4vKiAgKi9cbjI7XG52YXIgTGF5b3V0ID1cbi8qICAgICovXG40O1xudmFyIFBhc3NpdmUkMSA9XG4vKiAgICovXG44O1xuXG4vLyBhbmQgc2hvdWxkIGJlIHJlc2V0IGJlZm9yZSBzdGFydGluZyBhIG5ldyByZW5kZXIuXG4vLyBUaGlzIHRyYWNrcyB3aGljaCBtdXRhYmxlIHNvdXJjZXMgbmVlZCB0byBiZSByZXNldCBhZnRlciBhIHJlbmRlci5cblxudmFyIHdvcmtJblByb2dyZXNzU291cmNlcyA9IF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gKHJvdyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgdmFyIGN1cnJlbnRSb3cgPSByb3cuYWx0ZXJuYXRlOyAvLyBOZXcgcm93cyBjYW4ndCBiZSBjb250ZW50IHJvd3MuXG5cbiAgICAgICAgICAgIGlmIChjdXJyZW50Um93ICE9PSBudWxsICYmIGZpbmRGaXJzdFN1c3BlbmRlZChjdXJyZW50Um93KSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAvLyBUaGlzIGlzIHRoZSBiZWdpbm5pbmcgb2YgdGhlIG1haW4gY29udGVudC5cbiAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3MuY2hpbGQgPSByb3c7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgbmV4dFJvdyA9IHJvdy5zaWJsaW5nO1xuICAgICAgICAgICAgcm93LnNpYmxpbmcgPSBfdGFpbDtcbiAgICAgICAgICAgIF90YWlsID0gcm93O1xuICAgICAgICAgICAgcm93ID0gbmV4dFJvdztcbiAgICAgICAgICB9IC8vIFRPRE86IElmIHdvcmtJblByb2dyZXNzLmNoaWxkIGlzIG51bGwsIHdlIGNhbiBjb250aW51ZSBvbiB0aGUgdGFpbCBpbW1lZGlhdGVseS5cblxuXG4gICAgICAgICAgaW5pdFN1c3BlbnNlTGlzdFJlbmRlclN0YXRlKHdvcmtJblByb2dyZXNzLCB0cnVlLCAvLyBpc0JhY2t3YXJkc1xuICAgICAgICAgIF90YWlsLCBudWxsLCAvLyBsYXN0XG4gICAgICAgICAgdGFpbE1vZGUpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgJ3RvZ2V0aGVyJzpcbiAgICAgICAge1xuICAgICAgICAgIGluaXRTdXNwZW5zZUxpc3RSZW5kZXJTdGF0ZSh3b3JrSW5Qcm9ncmVzcywgZmFsc2UsIC8vIGlzQmFja3dhcmRzXG4gICAgICAgICAgbnVsbCwgLy8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ZhciBub2RlID0gd29ya0luUHJvZ3Jlc3MuY2hpbGQ7XG5cbiAgICB3aGlsZSAobm9kZSAhPT0gbnVsbCkge1xuICAgICAgaWYgKG5vZGUudGFnID09PSBIb3N0Q29tcG9uZW50IHx8IG5vZGUudGFnID09PSBIb3N0VGV4dCkge1xuICAgICAgICBhcHBlbmRJbml0aWFsQ2hpbGQocGFyZW50LCBub2RlLnN0YXRlTm9kZSk7XG4gICAgICB9IGVsc2UgaWYgKG5vZGUudGFnID09PSBIb3N0UG9ydGFsKSA7IGVsc2UgaWYgKG5vZGUuY2hpbGQgIT09IG51bGwpIHtcbiAgICAgICAgbm9kZS5jaGlsZC5yZXR1cm4gPSBub2RlO1xuICAgICAgICBub2RlID0gbm9kZS5jaGlsZDtcbiAgICAgICAgY29udGludWU7XG4gICAgICB9XG5cbiAgICAgIGlmIChub2RlID09PSB3b3JrSW5Qcm9ncmVzcykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSB3b3JrSW5Qcm9ncmVzcykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIG5vZGUgPSBub2RlLnJldHVybjtcbiAgICAgIH1cblxuICAgICAgbm9kZS5zaWJsaW5nLnJldHVybiA9IG5vZGUucmV0dXJuO1xuICAgICAgbm9kZSA9IG5vZGUuc2libGluZztcbiAgICB9XG4gIH07XG5cbiAgdXBkYXRlSG9zdENvbnRhaW5lciA9IGZ1bmN0aW9uIChjdXJyZW50LCB3b3JrSW5Qcm9ncmVzcykgey8vIE5vb3BcbiAgfTtcblxuICB1cGRhdGVIb3N0Q29tcG9uZW50JDEgPSBmdW5jdGlvbiAoY3VycmVudCwgd29ya0luUHJvZ3Jlc3MsIHR5cGUsIG5ld1Byb3BzLCByb290Q29udGFpbm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1c3BlbnNlQXZvaWRUaGlzRmFsbGJhY2spO1xuXG4gICAgICAgICAgICAgIGlmIChoYXNJbnZpc2libGVDaGlsZENvbnRleHQgfHwgaGFzU3VzcGVuc2VDb250ZXh0KHN1c3BlbnNlU3RhY2tDdXJzb3IuY3VycmVudCwgSW52aXNpYmxlUGFyZW50U3VzcGVuc2VDb250ZXh0KSkge1xuICAgICAgICAgICAgICAgIC8vIElmIHRoaXMgd2FzIGluIGFuIGludmlzaWJsZSB0cmVlIG9yIGEgbmV3IHJlbmRlciwgdGhlbiBzaG93aW5nXG4gICAgICAgICAgICAgICAgLy8gdGhpcyBib3VuZGFyeSBpcyBvay5cbiAgICAgICAgICAgICAgICByZW5kZXJEaWRTdXNwZW5kKCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gT3RoZXJ3aXNlLCB3ZSdyZSBnb2luZyB0byBoYXZlIHRvIGhpZGUgY29udGVudCBzbyB3ZSBzaG91bGRcbiAgICAgICAgICAgICAgICAvLyBzdXNwZW5kIGZvciBsb25nZXIgaWYgcG9zc2libGUuXG4gICAgICAgICAgICAgICAgcmVuZGVyRGlkU3VzcGVuZERlbGF5SWZQb3NzaWJsZSgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHdha2VhYmxlcyA9IHdvcmtJblByb2dyZXNzLnVwZGF0ZVF1ZXVlO1xuXG4gICAgICAgIGlmICh3YWtlYWJsZXMgIT09IG51bGwpIHtcbiAgICAgICAgICAvLyBTY2hlZHVsZSBhbiBlZmZlY3QgdG8gYXR0YWNoIGEgcmV0cnkgbGlzdGVuZXIgdG8gdGhlIHByb21pc2UuXG4gICAgICAgICAgLy8gVE9ETzogTW92ZSB0byBwYXNzaXZlIHBoYXNlXG4gICAgICAgICAgd29ya0luUHJvZ3Jlc3MuZmxhZ3MgfD0gVXBkYXRlO1xuICAgICAgICB9X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NuYXBzaG90QmVmb3JlVXBkYXRlKGZpbmlzaGVkV29yay5lbGVtZW50VHlwZSA9PT0gZmluaXNoZWRXb3JrLnR5cGUgPyBwcmV2UHJvcHMgOiByZXNvbHZlRGVmYXVsdFByb3BzKGZpbmlzaGVkV29yay50eXBlLCBwcmV2UHJvcHMpLCBwcmV2U3RhdGUpO1xuXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBkaWRXYXJuU2V0ID0gZGlkV2FybkFib3V0VW5kZWZpbmVkU25hcHNob3RCZWZvcmVVcGRhdGU7XG5cbiAgICAgICAgICAgICAgaWYgKHNuYXBzaG90ID09PSB1bmRlZmluZWQgJiYgIWRpZFdhcm5TZXQuaGFzKGZpbmlzaGVkV29yay50eXBlKSkge1xuICAgICAgICAgICAgICAgIGRpZFdhcm5TZXQuYWRkKGZpbmlzaGVkV29yay50eXBlKTtcblxuICAgICAgICAgICAgICAgIGVycm9yKCclcy5nZXRTbmFwc2hvdEJlZm9yZVVwZGF0ZSgpOiBBIHNuYXBzaG90IHZhbHVlIChvciBudWxsKSAnICsgJ211c3QgYmUgcmV0dXJuZWQuIFlvdSBoYXZlIHJldHVybmVkIHVuZGVmaW5lZC4nLCBnZXRDb21wb25lbnROYW1lRnJvbUZpYmVyKGZpbmlzaGVkV29yaykpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlID0gc25hcHNob3Q7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIGlmIChzdXBwb3J0c011dGF0aW9uKSB7XG4gICAgICAgICAgICB2YXIgcm9vdCA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7XG4gICAgICAgICAgICBjbGVhckNvbnRhaW5lcihyb290L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BmbGFncykgPT09IGZsYWdzKSB7XG4gICAgICAgIC8vIFVubW91bnRcbiAgICAgICAgdmFyIGRlc3Ryb3kgPSBlZmZlY3QuZGVzdHJveTtcbiAgICAgICAgZWZmZWN0LmRlc3Ryb3kgPSB1bmRlZmluZWQ7XG5cbiAgICAgICAgaWYgKGRlc3Ryb3kgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBQYXNzaXZlJDEpICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgbWFya0NvbXBvbmVudFBhc3NpdmVFZmZlY3RVbm1vdW50U3RhcnRlZChmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgfSBlbHNlIGlmICgoZmxhZ3MgJiBMYXlvdXQpICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdFVubW91bnRTdGFydGVkKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKChmbGFncyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICBzZXRJc1J1bm5pbmdJbnNlcnRpb25FZmZlY3QodHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZmluaXNoZWRXb3JrLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcblxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgc2V0SXNSdW5uaW5nSW5zZXJ0aW9uRWZmZWN0KGZhbHNlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB7XG4gICAgICAgIC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gICB9IGVsc2UgaWYgKChmbGFncyAmIExheW91dCkgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdE1vdW50U3RhcnRlZChmaW5pc2hlZFdvcmspO1xuICAgICAgICAgIH1cbiAgICAgICAgfSAvLyBNb3VudFxuXG5cbiAgICAgICAgdmFyIGNyZWF0ZSA9IGVmZmVjdC5jcmVhdGU7XG5cbiAgICAgICAge1xuICAgICAgICAgIGlmICgoZmxhZ3MgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgIHNldElzUnVubmluZ0luc2VydGlvbkVmZmVjdCh0cnVlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBlZmZlY3QuZGVzdHJveSA9IGNyZWF0ZSgpO1xuXG4gICAgICAgIHtcbiAgICAgICAgICBpZiAoKGZsYWdzICYgSW5zZXJ0aW9uKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICBzZXRJc1J1bm5pbmdJbnNlcnRpb25FZmZlY3QoZmFsc2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHtcbiAgICAgICAgICBpZiAoKGZsYWdzICYgUGFzc2l2ZSQxKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICBtYXJrQ29tcG9uZW50UGFzc2l2ZUVmZmVjdE1vdW50U3RvcHBlZCgpO1xuICAgICAgICAgIH0gZWxzZSBpZiAoKGZsYWdzICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0TW91bnRTdG9wcGVkKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAge1xuICAgICAgICAgIHZhciBkZXN0cm95ID0gZWZmZWN0LmRlc3Ryb3k7XG5cbiAgICAgICAgICBpZiAoZGVzdHJveSAhPT0gdW5kZWZpbmVk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G4gICAgICAgICAgICBpZiAodHlwZW9mIG9uUG9zdENvbW1pdCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICBvblBvc3RDb21taXQoaWQsIHBoYXNlLCBwYXNzaXZlRWZmZWN0RHVyYXRpb24sIGNvbW1pdFRpbWUpO1xuICAgICAgICAgICAgfSAvLyBCdWJibGUgdGltZXMgdG8gdGhlIG5leHQgbmVhcmVzdCBhbmNlc3RvciBQcm9maWxlci5cbiAgICAgICAgICAgIC8vIEFmdGVyIHdlIHByb2Nlc3MgdGhhdCBQcm9maWxlciwgd2UnbGwgYnViYmxlIGZ1cnRoZXIgdXAuXG5cblxuICAgICAgICAgICAgdmFyIHBhcmVudEZpYmVyID0gZmluaXNoZWRXb3JrLnJldHVybjtcblxuICAgICAgICAgICAgb3V0ZXI6IHdoaWxlIChwYXJlbnRGaWJlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICAgICAgICAgICAgICB2YXIgcm9vdCA9IHBhcmVudEZpYmVyLnN0YXRlTm9kZTtcbiAgICAgICAgICAgICAgICAgIHJvb3QucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBQcm9maWxlcjpcbiAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnRTdGF0ZU5vZGUgPSBwYXJlbnRGaWJlci5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZU5vZGUucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuICAgICAgICAgICAgICB9XG5cbiAgICA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luaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdE1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdE1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmIChmaW5pc2hlZFdvcmsuZmxhZ3MgJiBVcGRhdGUpIHtcbiAgICAgICAgICAgIGlmICghb2Zmc2NyZWVuU3VidHJlZVdhc0hpZGRlbikge1xuICAgICAgICAgICAgICBpZiAoY3VycmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIC8vIFdlIGNvdWxkIHVwZGF0ZSBpbnN0YW5jZSBwcm9wcyBhbmQgc3RhdGUgaGVyZSxcbiAgICAgICAgICAgICAgICAvLyBidXQgaW5zdGVhZCB3ZSByZWx5IG9uIHRoZW0gYmVpbmcgc2V0IGR1cmluZyBsYXN0IHJlbmRlci5cbiAgICAgICAgICAgICAgICAvLyBUT0RPOiByZXZpc2l0IHRoaXMgd2hlbiB3ZSBpbXBsZW1lbn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gZmlsZSBhbiBpc3N1ZS4nLCBnZXRDb21wb25lbnROYW1lRnJvbUZpYmVyKGZpbmlzaGVkV29yaykgfHwgJ2luc3RhbmNlJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIGZpbmlzaGVkV29yay5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFuY2UuY29tcG9uZW50RGlkTW91bnQoKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZE1vdW50KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBwcmV2UHJvcHMgPSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgPT09IGZpbmlzaGVkV29yay50eXBlID8gY3VycmVudC5tZW1vaXplZFByb3BzIDogcmVzb2x2ZURlZmF1bHRQcm9wcyhmaW5pc2hlZFdvcmsudHlwZSwgY3VycmVudC5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgICAgICB2YXIgcHJldlN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlOyAvLyBXZSBjb3VsZCB1cGRhdGUgaW5zdGFuY2UgcHJvcHMgYW5kIHN0YXRlIGhlcmUsXG4gICAgICAgICAgICAgICAgLy8gYnV0IGluc3RlYWQgd2UgcmVseSBvbiB0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lIG9mIGEgYnVnIGluIFJlYWN0LCBvciBiZWNhdXNlICcgKyAnYSBjb21wb25lbnQgcmVhc3NpZ25zIGl0cyBvd24gYHRoaXMuc3RhdGVgLiAnICsgJ1BsZWFzZSBmaWxlIGFuIGlzc3VlLicsIGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIoZmluaXNoZWRXb3JrKSB8fCAnaW5zdGFuY2UnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICAgICAgICBpbnN0YW5jZS5jb21wb25lbnREaWRVcGRhdGUocHJldlByb3BzLCBwcmV2U3RhdGUsIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZFVwZGF0ZShwcmV2UHJvcHMsIHByZXZTdGF0ZSwgaW5zdGFuY2UuX19yZWFjdEludGVybmFsU25hcHNob3RCZWZvcmVVcGRhdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gLy8gVE9ETzogSSB0aGluayB0aGlzIGlzIG5vdyBhbHdheXMgbm9uLW51bGwgYnkgdGhlIHRpbWUgaXQgcmVhY2hlcyB0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BpZiAoX3VwZGF0ZVF1ZXVlICE9PSBudWxsKSB7XG4gICAgICAgICAgICB2YXIgX2luc3RhbmNlID0gbnVsbDtcblxuICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBzd2l0Y2ggKGZpbmlzaGVkV29yay5jaGlsZC50YWcpIHtcbiAgICAgICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgICAgICBfaW5zdGFuY2UgPSBnZXRQdWJsaWNJbnN0YW5jZShmaW5pc2hlZFdvcmsuY2hpbGQuc3RhdGVOb2RlKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAgICAgICAgICAgIF9pbnN0YW5jZSA9IGZpbmlzaGVkV29yay5jaGlsZC5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb21taXRVcGRhdGVRdWV1ZShmaW5pc2hlZFdvcmssIF91cGRhdGVRdWV1ZSwgX2luc3RhbmNlKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX2luc3RhbmNlMiA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7IC8vIFJlbmRlcmVycyBtYXkgc2NoZWR1bGUgd29yayB0byBiZSBkb25lIGFmdGVyIGhvc3QgY29tcG9uZW50cyBhcmUgbW91bnRlZFxuICAgICAgICAgIC8vIChlZyBET00gcmVuZGVyZXIgbWF5IHNjaGVkdWxlIGF1dG8tZm9jdXMgZm9yIGlucHV0cyBhbmQgZm9ybSBjb250cm9scykuXG4gICAgICAgICAgLy8gVGhlc2UgZWZmZWN0cyBzaG91bGQgb25seSBiZSBjb21taXR0ZWQgd2hlbiBjb21wb25lbnRzIGFyZSBmaXJzdCBtb3VudGVkLFxuICAgICAgICAgIC8vIGFrYSB3aGVuIHRoZXJlIGlzIG5vIGN1cnJlbnQvYWx0ZXJuYXRlLlxuXG4gICAgICAgICAgaWYgKGN1cnJlbnQgPT09IG51bGwgJiYgZmluaXNoZWRXb3JrLmZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlO1xuICAgICAgICAgICAgdmFyIHByb3BzID0gZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICBjb21taXRNb3VudChfaW5zdGFuY2UyLCB0eXBlLCBwcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICB7XG4gICAgICAgICAgLy8gV2UgaGF2ZSBubyBsaWZlLWN5Y2xlcyBhc3NvY2lhdGVkIHdpdGggdGV4dC5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RQb3J0YWw6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBXZSBoYXZlIG5vIGxpZmUtY3ljbGVzIGFzc29jaWF0ZWQgd2l0aCBwb3J0YWxzLlxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgUHJvZmlsZXI6XG4gICAgICAgIHtcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgX2ZpbmlzaGVkV29yayRtZW1vaXplMiA9IGZpbmlzaGVkV29yay5tZW1vaXplZFByb3BzLFxuICAgICAgICAgICAgICAgIG9uQ29tbWl0ID0gX2ZpbmlzaGVkV29yayRtZW1vaXplMi5vbkNvbW1pdCxcbiAgICAgICAgICAgICAgICBvblJlbmRlciA9IF9maW5pc2hlZFdvcmskbWVtb2l6ZTIub25SZW5kZXI7XG4gICAgICAgICAgICB2YXIgZWZmZWN0RHVyYXRpb24gPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlLmVmZmVjdER1cmF0aW9uO1xuICAgICAgICAgICAgdmFyIGNvbW1pdFRpbWUgPSBnZXRDb21taXRUaW1lKCk7XG4gICAgICAgICAgICB2YXIgcGhhc2UgPSBjdXJyZW50ID09PSBudWxsID8gJ21vdW50JyA6ICd1cGRhdGUnO1xuXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGlmIChpc0N1cnJlbnRVcGRhdGVOZXN0ZWQoKSkge1xuICAgICAgICAgICAgICAgIHBoYXNlID0gJ25lc3RlZC11cGRhdGUnO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2Ygb25SZW5kZXIgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgb25SZW5kZXIoZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHMuaWQsIHBoYXNlLCBmaW5pc2hlZFdvcmsuYWN0dWFsRHVyYXRpb24sIGZpbmlzaGVkV29yay50cmVlQmFzZUR1cmF0aW9uLCBmaW5pc2hlZFdvcmsuYWN0dWFsU3RhcnRUaW1lLCBjb21taXRUaW1lKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIG9uQ29tbWl0ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgb25Db21taXQoZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHMuaWQsIHBoYXNlLCBlZmZlY3REdXJhdGlvbiwgY29tbWl0VGltZSk7XG4gICAgICAgICAgICAgIH0gLy8gU2NoZWR1bGUgYSBwYXNzaXZlIGVmZmVjdCBmb3IgdGhpcyBQcm9maWxlciB0byBjYWxsIG9uUG9zdENvbW1pdCBob29rcy5cbiA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ICB2YXIgcGFyZW50U3RhdGVOb2RlID0gcGFyZW50RmliZXIuc3RhdGVOb2RlO1xuICAgICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZU5vZGUuZWZmZWN0RHVyYXRpb24gKz0gZWZmZWN0RHVyYXRpb247XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHBhcmVudEZpYmVyID0gcGFyZW50RmliZXIucmV0dXJuO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBTdXNwZW5zZUNvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIGNvbW1pdFN1c3BlbnNlSHlkcmF0aW9uQ2FsbGJhY2tzKGZpbmlzaGVkUm9vdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFN1c3BlbnNlTGlzdENvbXBvbmVudDpcbiAgICAgIGNhc2UgSW5jb21wbGV0ZUNsYXNzQ29tcG9uZW50OlxuICAgICAgY2FzZSBTY29wZUNvbXBvbmVudDpcbiAgICAgIGNhc2UgT2Zmc2NyZWVuQ29tcG9uZW50OlxuICAgICAgY2FzZSBMZWdhY3lIaWRkZW5Db21wb25lbnQ6XG4gICAgICBjYXNlIFRyYWNpbmdNYXJrZXJDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1RoaXMgdW5pdCBvZiB3b3JrIHRhZyBzaG91bGQgbm90IGhhdmUgc2lkZS1lZmZlY3RzLiBUaGlzIGVycm9yIGlzICcgKyAnbGlrZWx5IGNhdXNlZCBieSBhIGJ1ZyBpbiBSZWFjdC4gUGxlYXNl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4gICAgICAgIGlmIChob3N0U3VidHJlZVJvb3QgPT09IG51bGwpIHtcbiAgICAgICAgICBob3N0U3VidHJlZVJvb3QgPSBub2RlO1xuXG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHZhciBpbnN0YW5jZSA9IG5vZGUuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgICBpZiAoaXNIaWRkZW4pIHtcbiAgICAgICAgICAgICAgaGlkZUluc3RhbmNlKGluc3RhbmNlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHVuaGlkZUluc3RhbmNlKG5vZGUuc3RhdGVOb2RlLCBub2RlLm1lbW9pemVkUHJvcHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAobm9kZS50YWcgPT09IEhvc3RUZXh0KSB7XG4gICAgICAgIGlmIChob3N0U3VidHJlZVJvb3QgPT09IG51bGwpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIF9pbnN0YW5jZTMgPSBub2RlLnN0YXRlTm9kZTtcblxuICAgICAgICAgICAgaWYgKGlzSGlkZGVuKSB7XG4gICAgICAgICAgICAgIGhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB1bmhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMywgbm9kZS5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKChub2RlLnRhZyA9PT0gT2Zmc2NyZWVuQ29tcG9uZW50IHx8IG5vZGUudGFnID09PSBMZWdhY3lIaWRkZW5Db21wb25lbnQpICYmIG5vZGUubWVtb2l6ZWRTdGF0ZSAhPT0gbnVsbCAmJiBub2RlICE9PSBmaW5pc2hlZFdvcmspIDsgZWxzZSBpZiAobm9kZS5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIG5vZGUgPSBub2RlLmNoaWxkO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKG5vZGUgPT09IGZpbmlzaGVkV29yaykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSBmaW5pc2hlZFdvcmspIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaG9zdFN1YnRyZWVSb290ID09PSBub2RlKSB7XG4gICAgICAgICAgaG9zdFN1YnRyZWVSb290ID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIG5vZGUgPSBub2RlLnJldHVybjtcbiAgICAgIH1cblxuICAgICAgaWYgKGhvc3RTdWJ0cmVlUm9vdCA9PT0gbm9kZSkge1xuICAgICAgICBob3N0U3VidHJlZVJvb3QgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICBub2RlLnNpYmxpbmcucmV0dXJuID0gbm9kZS5yZXR1cm47XG4gICAgICBub2RlID0gbm9kZS5zaWJsaW5nO1xuICAgIH1cbiAgfVxufVxuXG5mdW5jdGlvbiBjb21taXRBdHRhY2hSZWYoZmluaXN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XG4gICAgICAgICAgaWYgKHVwZGF0ZVF1ZXVlICE9PSBudWxsKSB7XG4gICAgICAgICAgICB2YXIgbGFzdEVmZmVjdCA9IHVwZGF0ZVF1ZXVlLmxhc3RFZmZlY3Q7XG5cbiAgICAgICAgICAgIGlmIChsYXN0RWZmZWN0ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBmaXJzdEVmZmVjdCA9IGxhc3RFZmZlY3QubmV4dDtcbiAgICAgICAgICAgICAgdmFyIGVmZmVjdCA9IGZpcnN0RWZmZWN0O1xuXG4gICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICB2YXIgX2VmZmVjdCA9IGVmZmVjdCxcbiAgICAgICAgICAgICAgICAgICAgZGVzdHJveSA9IF9lZmZlY3QuZGVzdHJveSxcbiAgICAgICAgICAgICAgICAgICAgdGFnID0gX2VmZmVjdC50YWc7XG5cbiAgICAgICAgICAgICAgICBpZiAoZGVzdHJveSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoKHRhZyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgodGFnICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0YXJ0ZWQoZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICggZGVsZXRlZEZpYmVyLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGRlbGV0ZWRGaWJlcik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZGVsZXRlZEZpYmVyLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0b3BwZWQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGVmZmVjdCA9IGVmZmVjdC5uZXh0O1xuICAgICAgICAgICAgICB9IHdoaWxlIChlZmZlY3QgIT09IGZpcnN0RWZmZWN0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlRGVsZXRpb25FZmZlY3RzKGZpbmlzaGVkUm9vdCwgbmVhcmVzdE1vdW50ZWRBbmNlc3RvciwgZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgIHtcbiAgICAgICAgaWYgKCFvZmZzY3JlZW5TdWJ0cmVlV2FzSGlkZGVuKSB7XG4gICAgICAgICAgc2FmZWx5RGV0YWNoUmVmKGRlbGV0ZWRGaWJlciwgbmVhcmVzdE1vdW50ZWRBbmNlc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VyLFxuICAgICAgICAgIC8vIGUuZy4gYSBkZXN0cm95IGZ1bmN0aW9uIGluIG9uZSBjb21wb25lbnQgc2hvdWxkIG5ldmVyIG92ZXJyaWRlIGEgcmVmIHNldFxuICAgICAgICAgIC8vIGJ5IGEgY3JlYXRlIGZ1bmN0aW9uIGluIGFub3RoZXIgY29tcG9uZW50IGR1cmluZyB0aGUgc2FtZSBjb21taXQuXG5cblxuICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdFVubW91bnQoTGF5b3V0IHwgSGFzRWZmZWN0LCBmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQgfCBIYXNFZmZlY3QsIGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybik7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN0cyhmaW5pc2hlZFdvcmspO1xuXG4gICAgICAgIGlmIChmbGFncyAmIFJlZikge1xuICAgICAgICAgIGlmIChjdXJyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICBzYWZlbHlEZXRhY2hSZWYoY3VycmVudCwgY3VycmVudC5yZXR1cm4pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgIHtcbiAgICAgICAgcmVjdXJzaXZlbHlUcmF2ZXJzZU11dGF0aW9uRWZmZWN0cyhyb290LCBmaW5pc2hlZFdvcmspO1xuICAgICAgICBjb21taXRSZWNvbmNpbGlhdGlvbkVmZmVjdHMoZmluaXNoZWRXb3JrKTtcblxuICAgICAgICBpZiAoZmxhZ3MgJiBSZWYpIHtcbiAgICAgICAgICBpZiAoY3VycmVudCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgc2FmZWx5RGV0YWNoUmVmKGN1cnJlbnQsIGN1cnJlbnQucmV0dXJuKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc3VwcG9ydHNNdXRhdGlvbikge1xuICAgICAgICAgIC8vIFRPRE86IENvbnRlbnRSZXNldCBnZXRzIGNsZWFyZWQgYnkgdGhlIGNoaWxkcmVuIGR1cmluZyB0aGUgY29tbWl0XG4gICAgICAgICAgLy8gcGhhc2UuIFRoaXMgaXMgYSByZWZhY3RvciBoYXphcmQgYmVjYXVzZSBpdCBtZWFucyB3ZSBtdXN0IHJlYWRcbi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zOyAvLyBGb3IgaHlkcmF0aW9uIHdlIHJldXNlIHRoZSB1cGRhdGUgcGF0aCBidXQgd2UgdHJlYXQgdGhlIG9sZFByb3BzXG4gICAgICAgICAgICAgIC8vIGFzIHRoZSBuZXdQcm9wcy4gVGhlIHVwZGF0ZVBheWxvYWQgd2lsbCBjb250YWluIHRoZSByZWFsIGNoYW5nZSBpblxuICAgICAgICAgICAgICAvLyB0aGlzIGNhc2UuXG5cbiAgICAgICAgICAgICAgdmFyIG9sZFByb3BzID0gY3VycmVudCAhPT0gbnVsbCA/IGN1cnJlbnQubWVtb2l6ZWRQcm9wcyA6IG5ld1Byb3BzO1xuICAgICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlOyAvLyBUT0RPOiBUeXBlIHRoZSB1cGRhdGVRdWV1ZSB0byBiZSBzcGVjaWZpYyB0byBob3N0IGNvbXBvbmVudHMuXG5cbiAgICAgICAgICAgICAgdmFyIHVwZGF0ZVBheWxvYWQgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG4gICAgICAgICAgICAgIGZpbmlzaGVkV29yay51cGRhdGVRdWV1ZSA9IG51bGw7XG5cbiAgICAgICAgICAgICAgaWYgKHVwZGF0ZVBheWxvYWQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgY29tbWl0VXBkYXRlKF9pbnN0YW5jZTQsIHVwZGF0ZVBheWxvYWQsIHR5cGUsIG9sZFByb3BzLCBuZXdQcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxu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l6ZWRQcm9wcyA6IG5ld1RleHQ7XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGNvbW1pdFRleHRVcGRhdGUodGV4dEluc3RhbmNlLCBvbGRUZXh0LCBuZXdUZXh0KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgIGNhcHR1cmVDb21taXRQaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICB7XG4gICAgICAgIHJlY3Vyc2l2ZWx5VHJhdmVyc2VNdXRhdGlvbkVmZmVjdHMocm9vdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgY29tbWl0UmVjb25jaWxpYXRpb25FZmZlY3RzKGZpbmlzaGVkV29yayk7XG5cbiAgICAgICAgaWYgKGZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgaWYgKHN1cHBvcnRzTXV0YXRpb24gJiYgc3VwcG9ydHNIeWRyYXRpb24pIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBwcmV2Um9vdFN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlO1xuXG4gICAgICAgICAgICAgIGlmIChwcmV2Um9vdFN0YXRlLmlzRGVoeWRyYXRlZCkge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICBjb21taXRIeWRyYXRlZENvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoc3VwcG9ydHNQZXJzaXN0ZW5jZSkge1xuICAgICAgICAgICAgdmFyIGNvbnRhaW5lckluZm8gPSByb290LmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICB2YXIgcGVuZGluZ0NoaWxkcmVuID0gcm9vdC5wZW5kaW5nQ2hpbGRyZW47XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHJlcGxhY2VDb250YWluZXJDaGlsZHJlbihjb250YWluZXJJbmZvLCBwZW5kaW5nQ2hpbGRyZW4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN0cyhmaW5pc2hlZFdvcmspO1xuXG4gICAgICAgIGlmIChmbGFncyAmIFVwZGF0ZSkge1xuICAgICAgICAgIGlmIChzdXBwb3J0c1BlcnNpc3RlbmNlKSB7XG4gICAgICAgICAgICB2YXIgcG9ydGFsID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcbiAgICAgICAgICAgIHZhciBfY29udGFpbmVySW5mbyA9IHBvcnRhbC5jb250YWluZXJJbmZvO1xuICAgICAgICAgICAgdmFyI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Gl0IGR1cmluZyBhbiBldmVudFxuXG4gICAgICAgICAgb2Zmc2NyZWVuSW5zdGFuY2UuaXNIaWRkZW4gPSBpc0hpZGRlbjtcblxuICAgICAgICAgIGlmIChpc0hpZGRlbikge1xuICAgICAgICAgICAgdmFyIHdhc0hpZGRlbiA9IG9mZnNjcmVlbkZpYmVyLmFsdGVybmF0ZSAhPT0gbnVsbCAmJiBvZmZzY3JlZW5GaWJlci5hbHRlcm5hdGUubWVtb2l6ZWRTdGF0ZSAhPT0gbnVsbDtcblxuICAgICAgICAgICAgaWYgKCF3YXNIaWRkZW4pIHtcbiAgICAgICAgICAgICAgLy8gVE9ETzogTW92ZSB0byBwYXNzaXZlIHBoYXNlXG4gICAgICAgICAgICAgIG1hcmtDb21taXRUaW1lT2ZGYWxsYmFjaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmbGFncyAmIFVwZGF0ZSkge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb21taXRTdXNwZW5zZUNhbGxiYWNrKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgIGNhcHR1cmVDb21taXRQaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGF0dGFjaFN1c3BlbnNlUmV0cnlMaXN0ZW5lcnMoZmluaXNoZWRXb3JrKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgT2Zmc2NyZWVuQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICB2YXIgX3dhc0hpZGRlbiA9IGN1cnJlbnQgIT09IG51bGwgJiYgY3VycmVudC5tZW1vaXplZFN0YXRlICE9PSBudWxsO1xuXG4gICAgICAgIGlmICggLy8gVE9ETzogUmVtb3ZlI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AgICAgaWYgKCBmaWJlci5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgY29tbWl0SG9va0VmZmVjdExpc3RVbm1vdW50KExheW91dCwgZmliZXIsIGZpYmVyLnJldHVybik7XG4gICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaWJlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQsIGZpYmVyLCBmaWJlci5yZXR1cm4pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBUT0RPIChPZmZzY3JlZW4pIENoZWNrOiBmbGFncyAmIFJlZlN0YXRpY1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICB2YXIgaW5zdGFuY2UgPSBmaWJlci5zdGF0ZU5vZGU7XG5cbiAgICAgICAgICBpZiAodHlwZW9mIGluc3RhbmNlLmNvbXBvbmVudFdpbGxVbm1vdW50ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICBzYWZlbHlDYWxsQ29tcG9uZW50V2lsbFVubW91bnQoZmliZXIsIGZpYmVyLnJldHVybiwgaW5zdGFuY2UpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKT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IGlmIChmaWJlci50YWcgPT09IEhvc3RDb21wb25lbnQpIHtcbiAgICAgICAgdmFyIG5vZGUgPSBmaWJlci5zdGF0ZU5vZGU7XG5cbiAgICAgICAgaWYgKG1hdGNoQWNjZXNzaWJpbGl0eVJvbGUobm9kZSwgc2VsZWN0b3IudmFsdWUpKSB7XG4gICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgYnJlYWs7XG5cbiAgICBjYXNlIFRFWFRfVFlQRTpcbiAgICAgIGlmIChmaWJlci50YWcgPT09IEhvc3RDb21wb25lbnQgfHwgZmliZXIudGFnID09PSBIb3N0VGV4dCkge1xuICAgICAgICB2YXIgdGV4dENvbnRlbnQgPSBnZXRUZXh0Q29udGVudChmaWJlcik7XG5cbiAgICAgICAgaWYgKHRleHRDb250ZW50ICE9PSBudWxsICYmIHRleHRDb250ZW50LmluZGV4T2Yoc2VsZWN0b3IudmFsdWUpID49IDApIHtcbiAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBicmVhaztcblxuICAgIGNhc2UgVEVTVF9OQU1FX1RZUEU6XG4gICAgICBpZiAoZmliZXIudGFnID09PSBIb3N0Q29tcG9uZW50KSB7XG4gICAgICAgIHZhciBkYXRhVGVzdElEID0gZmliZXIubWVtb2l6ZWRQcm9wc1snZGF0YS10ZXN0bmFtZSddO1xuXG4gICAgICAgIGlmICh0eXBlb2YgZGF0YVRlc3RJRCA9PT0gJ3N0cmluZycgJiYgZGF0YVRlc3RJRC50b0xvd2VyQ2FzZSgpID09PSBzZWxlY3Rvci52YWx1ZS50b0xvd2VyQ2FzZSgpKSB7XG4gICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgYnJlYWs7XG5cbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIHNlbGVjdG9yIHR5cGUg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YgKCFvYmplY3RJcyhnZXRTbmFwc2hvdCgpLCByZW5kZXJlZFZhbHVlKSkge1xuICAgICAgICAgICAgICAgIC8vIEZvdW5kIGFuIGluY29uc2lzdGVudCBzdG9yZS5cbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgIC8vIElmIGBnZXRTbmFwc2hvdGAgdGhyb3dzLCByZXR1cm4gYGZhbHNlYC4gVGhpcyB3aWxsIHNjaGVkdWxlXG4gICAgICAgICAgICAgIC8vIGEgcmUtcmVuZGVyLCBhbmQgdGhlIGVycm9yIHdpbGwgYmUgcmV0aHJvd24gZHVyaW5nIHJlbmRlci5cbiAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHZhciBjaGlsZCA9IG5vZGUuY2hpbGQ7XG5cbiAgICBpZiAobm9kZS5zdWJ0cmVlRmxhZ3MgJiBTdG9yZUNvbnNpc3RlbmN5ICYmIGNoaWxkICE9PSBudWxsKSB7XG4gICAgICBjaGlsZC5yZXR1cm4gPSBub2RlO1xuICAgICAgbm9kZSA9IGNoaWxkO1xuICAgICAgY29udGludWU7XG4gICAgfVxuXG4gICAgaWYgKG5vZGUgPT09IGZpbmlzaGVkV29yaykge1xuICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuXG4gICAgd2hpbGUgKG5vZGUuc2libGluZyA9PT0gbnVsbCkge1xuICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSBmaW5pc2hlZFdvcmspIHtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG5cbiAgICAgIG5vZGUgPSBub2RlLnJldHVybjtcbiAgICB9XG5cbiAgICBub2RlLnNpYmxpbmcucmV0dXJu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ZFJlZjtcblxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IHJlc29sdmVGb3J3YXJkUmVmRm9ySG90UmVsb2FkaW5nKHJlc29sdmVkVHlwZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuXG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfTUVNT19UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gTWVtb0NvbXBvbmVudDtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9MQVpZX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBMYXp5Q29tcG9uZW50O1xuICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciBpbmZvID0gJyc7XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gdW5kZWZpbmVkIHx8IHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsICYmIE9iamVjdC5rZXlzKHR5cGUpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICBpbmZvICs9ICcgWW91IGxpa2VseSBmb3Jnb3QgdG8gZXhwb3J0IHlvdXIgY29tcG9uZW50IGZyb20gdGhlIGZpbGUgJyArIFwiaXQncyBkZWZpbmVkIGluLCBvciB5b3UgbWlnaHQgaGF2ZSBtaXhlZCB1cCBkZWZhdWx0IGFuZCBcIiArICduYW1lZCBpbXBvcnRzLic7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBvd25lck5hbWUgPSBvd25lciA/IGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIob3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ICAgIHJldHVybiBudWxsO1xuICB9XG5cbiAgcmV0dXJuIGhvc3RGaWJlci5zdGF0ZU5vZGU7XG59XG5cbmZ1bmN0aW9uIGZpbmRIb3N0SW5zdGFuY2VXaXRoV2FybmluZyhjb21wb25lbnQsIG1ldGhvZE5hbWUpIHtcbiAge1xuICAgIHZhciBmaWJlciA9IGdldChjb21wb25lbnQpO1xuXG4gICAgaWYgKGZpYmVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgIGlmICh0eXBlb2YgY29tcG9uZW50LnJlbmRlciA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1VuYWJsZSB0byBmaW5kIG5vZGUgb24gYW4gdW5tb3VudGVkIGNvbXBvbmVudC4nKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXMoY29tcG9uZW50KS5qb2luKCcsJyk7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcihcIkFyZ3VtZW50IGFwcGVhcnMgdG8gbm90IGJlIGEgUmVhY3RDb21wb25lbnQuIEtleXM6IFwiICsga2V5cyk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIGhvc3RGaWJlciA9IGZpbmRDdXJyZW50SG9zdEZpYmVyKGZpYmVyKTtcblxuICAgIGlmIChob3N0RmliZXIgPT09IG51bGwpIHtcbiAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIGlmIChob3N0RmliZXIubW9kZSAmIFN0cmljdExlZ2FjeU1vZGUpIHtcbiAgICAgIHZhciBjb21wb25lbnROYW1lID0gZ2V0Q29tcG9uZW50TmFtZUZyb21GaWJlcihmaWJlcikgfHwgJ0NvbXBvbmVudCc7XG5cbiAgICAgIGlmICghZGlkV2FybkFib3V0RmluZE5vZGVJblN0cmljdE1vZGVbY29tcG9uZW50TmFtZV0pIHtcbiAgICAgICAgZGlkV2FybkFib3V0RmluZE5vZGVJblN0cmljdE1vZGVbY29t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IGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJBbmltYXRpb25TdGF0ZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNsaXAgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlZWQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaG91bGRSZXNldCA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJBbmltYXRpb25TdGF0ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkFuaW1hdGlvblN0YXRlIHx8IChQQkFuaW1hdGlvblN0YXRlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQkFuaW1hdG9yIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYW5pbWF0b3IuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdC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XVkaW9Tb3VyY2UuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQkF1ZGlvU291cmNlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52b2x1bWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5waXRjaCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmF1ZGlvQ2xpcFVybCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF1ZGlvU291cmNlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXVkaW9Tb3VyY2UgfHwgKFBCQXVkaW9Tb3VyY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXVkaW9Tb3VyY2UgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdWRpb19zb3VyY2UuZ2VuJztcbi8q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HJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJBdWRpb1N0cmVhbSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uudm9sdW1lID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXJsID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICA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BtZXNzYWdlID0gY3JlYXRlQmFzZVBCQXZhdGFyQXR0YWNoKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYXZhdGFySWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYW5jaG9yUG9pbnRJZCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCQXZhdGFyQXR0YWNoLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyQXR0YWNoIHx8IChQQkF2YXRhckF0dGFjaCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJBdmF0YXJBdHRhY2ggfSBmcm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ICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJBdmF0YXJNb2RpZmllckFyZWEoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4Y2x1ZGVJZHMucHVzaChyZWFkZXIuc3RyaW5nKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGlmaWVycy5wdXNoKHJlYWRlci5pbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbmQyID0gcmVhZGVyLnVpbnQzMigpICsgcmVhZGVyLnBvcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kaWZpZXJzLnB1c2gocmVhZGVyLmludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF2YXRhck1vZGlmaWVyQXJlYS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkF2YXRhck1vZGlmaWVyQXJlYSB8fCAoUEJBdmF0YXJNb2RpZmllckFyZWEgPSB7fSkpO1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLmNvbW1vblwiO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBvc2l0aW9uKCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAsIHo6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBvc2l0aW9uO1xuKGZ1bmN0aW9uIChQb3NpdGlvbikge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UueCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UueSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS55KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS56ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI5KS5mbG9hdChtZXNzYWdlLnopO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBvc2l0aW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUG9zaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnogPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQb3NpdGlvbi5kZWNvZGUgPSBkZWNvZGU7XG59KShQb3NpdGlvbiB8fCAoUG9zaXRpb24gPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVZlY3RvcjMoKSB7XG4gICAgcmV0dXJuIHsgeDogMCwgeTogMCwgejogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgVmVjdG9yMztcbihmdW5jdGlvbiAoVmVjdG9yMykge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UueCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UueSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS55KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS56ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI5KS5mbG9hdChtZXNzYWdlLnopO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFZlY3RvcjMuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWZWN0b3IzKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS56ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgVmVjdG9yMy5kZWNvZGUgPSBkZWNvZGU7XG59KShWZWN0b3IzIHx8IChWZWN0b3IzID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VWZWN0b3IyKCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFZlY3RvcjI7XG4oZnVuY3Rpb24gKFZlY3RvcjIpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS54ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLngpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UueSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVmVjdG9yMi5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVZlY3RvcjIoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZlY3RvcjIuZGVjb2RlID0gZGVjb2RlO1xufSkoVmVjdG9yMiB8fCAoVmVjdG9yMiA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUXVhdGVybmlvbigpIHtcbiAgICByZXR1cm4geyB4OiAwLCB5OiAwLCB6OiAwLCB3OiAwIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBRdWF0ZXJuaW9uO1xuKGZ1bmN0aW9uIChRdWF0ZXJuaW9uKSB7XG4gICAgZnVuY3Rpb24gZW5jb2RlKG1lc3NhZ2UsIHdyaXRlciA9IF9tMC5Xcml0ZXIuY3JlYXRlKCkpIHtcbiAgICAgICAgaWYgKG1lc3NhZ2UueCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMykuZmxvYXQobWVzc2FnZS54KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS55ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIxKS5mbG9hdChtZXNzYWdlLnkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnogIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2Uueik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UudyAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS53KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBRdWF0ZXJuaW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUXVhdGVybmlvbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS55ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLncgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBRdWF0ZXJuaW9uLmRlY29kZSA9IGRlY29kZTtcbn0pKFF1YXRlcm5pb24gfHwgKFF1YXRlcm5pb24gPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXZhdGFyTW9kaWZpZXJBcmVhIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYXZhdGFyX21vZGlmaWVyX2FyZWEuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBdmF0YXJNb2RpZmll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UaW1lc3RhbXApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRhbGtpbmcgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig3MikuYm9vbChtZXNzYWdlLnRhbGtpbmcpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLndlYXJhYmxlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4Mikuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLmVtb3Rlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5MCkuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCQXZhdGFyU2hhcGUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQkF2YXRhclNoYXBlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubmFtZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ib2R5U2hhcGUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2tpbkNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaGFpckNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZXllQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5leHByZXNzaW9uVHJpZ2dlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDY0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4cHJlc3Npb25UcmlnZ2VyVGltZXN0YW1wID0gbG9uZ1RvTnVtYmVyKHJlYWRlci5pbnQ2NCgpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50YWxraW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VhcmFibGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1vdGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF2YXRhclNoYXBlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyU2hhcGUgfHwgKFBCQXZhdGFyU2hhcGUgPSB7fSkpO1xuY29uc3QgdHNQcm90b0dsb2JhbFRoaXMgPSAoKCkgPT4ge1xuICAgIGlmICh0eXBlb2YgZ2xvYmFsVGhpcyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICByZXR1cm4gZ2xvYmFsVGhpcztcbiAgICB9XG4gICAgaWYgKHR5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ICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuciA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmcgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5iID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgQ29sb3IzLmRlY29kZSA9IGRlY29kZTtcbn0pKENvbG9yMyB8fCAoQ29sb3IzID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VDb2xvcjQoKSB7XG4gICAgcmV0dXJuIHsgcjogMCwgZzogMCwgYjogMCwgYTogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgQ29sb3I0O1xuKGZ1bmN0aW9uIChDb2xvcjQpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5yICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLnIpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmcgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UuZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyOSkuZmxvYXQobWVzc2FnZS5iKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5hICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDM3KS5mbG9hdChtZXNzYWdlLmEpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIENvbG9yNC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbG9yNCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnIgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmEgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXB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y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5iaWxsYm9hcmRNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJCaWxsYm9hcmQuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJCaWxsYm9hcmQgfHwgKFBCQmlsbGJvYXJkID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQkJpbGxib2FyZCB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL2JpbGxib2FyZC5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IEJpbGxib2FyZFNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDEwOTAsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCQmlsbGJvYXJkLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVCdWZmZXIoYnVmZmVyLCBm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W9kZSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJDYW1lcmFNb2RlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJDYW1lcmFNb2RlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJDYW1lcmFNb2RlL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iBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCQ2FtZXJhTW9kZUFyZWEoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJld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biAgICB9XG4gICAgUEJFbmdpbmVJbmZvLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJFbmdpbmVJbmZvKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mcmFtZU51bWJlciA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50b3RhbFJ1bnRpbWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCRW5naW5lSW5mby5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkVuZ2luZUluZm8gfHwgKFBCRW5naW5lSW5mbyA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJFbmdpbmVJbmZvIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvZW5naW5lX2luZm8uZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBFbmdpbmVJbmZvU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0OCxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJFbmdpbmVJbmZvLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVCdWZmZXIoYnVmZmVyLCBmYWxzZSk7XG4gICAgfSxcbiAgICBkZXNlcmlhbGl6ZShyZWFkZXIpIHtcbiAgICAgICAgcmV0dXJuI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ICAgICAgICAgICB3cml0ZXIudWludDMyKDEwKS5zdHJpbmcobWVzc2FnZS5zcmMpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzIpLnVpbnQzMihtZXNzYWdlLnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5pbnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDApLnVpbnQzMihtZXNzYWdlLmludmlzaWJsZU1lc2hlc0NvbGxpc2lvbk1hc2spO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCR2x0ZkNvbnRhaW5lcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aXNpYmxlTWVzaGVzQ29sbGlzaW9uTWFzayA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5pbnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkdsdGZDb250YWluZXIgfHwgKFBCR2x0ZkNvbnRhaW5lciA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJHbHR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AgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jdXJyZW50U3RhdGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkdsdGZDb250YWluZXJMb2FkaW5nU3RhdGUuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlIHx8IChQQkdsdGZDb250YWluZXJMb2FkaW5nU3RhdGUgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCR2x0ZkNvbnRhaW5lckxvYWRpbmdTdGF0ZSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL2dsdGZfY29udGFpbmVyX2xvYWRpbmdfc3RhdGUuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0OSxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ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DtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWF0ZXJpYWwgPSB7ICRjYXNlOiBcInVubGl0XCIsIHVubGl0OiBQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hdGVyaWFsID0geyAkY2FzZTogXCJwYnJcIiwgcGJyOiBQQk1hdGVyaWFsX1Bick1hdGVyaWFsLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBt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gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgQ29sb3I0LmVuY29kZShtZXNzYWdlLmRpZmZ1c2VDb2xvciwgd3JpdGVyLnVpbnQzMigzNCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0dXJlID0gVGV4dHVyZVVuaW9uLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYWxwaGFUZXN0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY2FzdFNoYWRvd3MgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpZmZ1c2VDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWxfVW5saXRNY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xuICAgICAgICAgICAgQ29sb3I0LmVuY29kZShtZXNzYWdlLmFsYmVkb0NvbG9yLCB3cml0ZXIudWludDMyKDU4KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmVtaXNzaXZlQ29sb3IgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgQ29sb3IzLmVuY29kZShtZXNzYWdlLmVtaXNzaXZlQ29sb3IsIHdyaXRlci51aW50MzIoNjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmVmbGVjdGl2aXR5Q29sb3IgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgQ29sb3IzLmVuY29kZShtZXNzYWdlLnJlZmxlY3Rpdml0eUNvbG9yLCB3cml0ZXIudWludDMyKDc0KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRyYW5zcGFyZW5jeU1vZGUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS50cmFuc3BhcmVuY3lNb2RlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tZXRhbGxpYyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDkzKS5mbG9hdChtZXNzYWdlLm1ldGFsbGljKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5yb3VnaG5lc3MgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDEpLmZsb2F0KG1lc3NhZ2Uucm91Z2huZXNzKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5zcGVjdWxhckludGVuc2l0eSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyK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gICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFscGhhVGVzdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNhc3RTaGFkb3dzID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbHBoYVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbWlzc2l2ZVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5idW1wVGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDU4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsYmVkb0NvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1pc3NpdmVDb2xvciA9IENvbG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDc0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJlZmxlY3Rpdml0eUNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRyYW5zcGFyZW5jeU1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWV0YWxsaWMgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJvdWdobmVzcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMTcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlY3VsYXJJbnRlbnNpdHkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmVtaXNzaXZlSW50ZW5zaXR5ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3RJbnRlbnNpdHkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsX1Bick1hdGVyaWFsLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwgPSB7fSkpO1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIG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VkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlVGV4dHVyZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53cmFwTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpbHRlck1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICA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dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VBdmF0YXJUZXh0dXJlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXNlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAg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ICAgICAgIGlmIChtZXNzYWdlLmZpbHRlck1vZGUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNCkuaW50MzIobWVzc2FnZS5maWx0ZXJNb2RlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBWaWRlb1RleHR1cmUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWaWRlb1RleHR1cmUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZpZGVvUGxheWVyRW50aXR5ID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmlsdGVyTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZpZGVvVGV4dHVyZS5kZWNvZGUgPSBkZWNvZGU7XG59KShWaWRlb1RleHR1cmUgfHwgKFZpZGVvVGV4dHVyZSA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlVGV4dHVyZVVuaW9uKCkge1xuICAgIHJldHVybiB7IHRleDogdW5kZWZpbmVkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBUZXh0dXJlVW5pb247XG4oZnVuY3Rpb24gKFRleHR1cmVVbmlvbikge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIHN3aXRjaCAobWVzc2FnZS50ZXg/LiRjYXNlKSB7XG4gICAgICAgICAgICBjYXNlIFwidGV4dHVyZVwiOlxuICAgICAgICAgICAgICAg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0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4ID0geyAkY2FzZTogXCJ0ZXh0dXJlXCIsIHRleHR1cmU6IFRleHR1cmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleCA9IHsgJGNhc2U6IFwiYXZhdGFyVGV4dHVyZVwiLCBhdmF0YXJUZXh0dXJlOiBBdmF0YXJUZXh0dXJlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXggPSB7ICRjYXNlOiBcInZpZGVvVGV4dHVyZVwiLCB2aWRlb1RleHR1cmU6IFZpZGVvVGV4dHVyZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09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maW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaENvbGxpZGVyKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImJveFwiLCBib3g6IFBCTWVzaENvbGxpZGVyX0JveE1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcInNwaGVyZVwiLCBzcGhlcmU6IFBCTWVzaENvbGxpZGVyX1NwaGVyZU1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImN5bGluZGVyXCIsIGN5bGluZGVyOiBQQk1lc2hDb2xsaWRlcl9DeWxpbmRlck1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcInBsYW5lXCIsIHBsYW5lOiBQQk1lc2hDb2xsaWRlcl9QbGFuZU1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWVzaENvbGxpZGVyLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWVzaENvbGxpZGVyIHx8IChQQk1lc2hDb2x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QgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c1RvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c0JvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbi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ShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiYm94XCIsIGJveDogUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwic3BoZXJlXCIsIHNwaGVyZTogUEJNZXNoUmVuZGVyZXJfU3BoZXJlTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiY3lsaW5kZXJcIiwgY3lsaW5kZXI6IFBCTWVzaFJlbmRlcmVyX0N5bGluZGVyTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwicGxhbmVcIiwgcGxhbmU6IFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXIuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJNZXNoUmVuZGVyZXIgfHwgKFBCTWVzaFJlbmRlcmVyID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9Cb3hNZXNoKCkge1xuICAgIHJldHVybiB7IHV2czogW10gfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBCTWVzaFJlbmRlcmVyX0JveE1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX0JveE1lc2gpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICB3cml0ZXIudWludDMyKDEwKS5mb3JrKCk7XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLnV2cykge1xuICAgICAgICAgICAgd3JpdGVyLmZsb2F0KHYpO1xuICAgICAgICB9XG4gICAgICAgIHdyaXRlci5sZGVsaW0oKTtcbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyX0JveE1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2cy5wdXNoKHJlYWRlci5mbG9hdCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1lc2hSZW5kZXJlcl9Cb3hNZXNoIHx8IChQQk1lc2hSZW5kZXJlcl9Cb3hNZXNoID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2goKSB7XG4gICAgcmV0dXJuIHsgcmFkaXVzVG9wOiB1bmRlZmluZWQsIHJhZGl1c0JvdHRvbTogdW5kZWZpbmVkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2g7XG4oZnVuY3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gICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2guZGVjb2RlID0gZGVjb2RlO1xufSkoUEJNZXNoUmVuZGVyZXJfQ3lsaW5kZXJNZXNoIHx8IChQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2ggPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCgpIHtcbiAgICByZXR1cm4geyB1dnM6IFtdIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIHdyaXRlci51aW50MzIoMTApLmZvcmsoKTtcbiAgICAgICAgZm9yIChjb25zdCB2IG9mIG1lc3NhZ2UudXZzKSB7XG4gICAgICAgICAgICB3cml0ZXIuZmxvYXQodik7XG4gICAgICAgIH1cbiAgICAgICAgd3JpdGVyLmxkZWxpbSgpO1xuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2guZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2cy5wdXNoKHJlYWRlci5mbG9hdCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXJfUGxhbmVNZXNoLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCB8fCAoUEJNZXNoUmVuZGVyZXJfUGxhbmVNZXNoID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9TcGhlcmVNZXNoKCkge1xuICAgIHJldHVybiB7fTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBCTWVzaFJlbmRlcmVyX1NwaGVyZU1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX1NwaGVyZU1lc2gpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUoXywgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICByZXR1cm4gd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WdlLnN0eWxlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTYpLmludDMyKG1lc3NhZ2Uuc3R5bGUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmNvbG9yICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIENvbG9yMy5lbmNvZGUobWVzc2FnZS5jb2xvciwgd3JpdGVyLnVpbnQzMigyNikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk5mdFNoYXBlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJOZnRTaGFwZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnVybiA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdHlsZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJOZnRTaGFwZS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk5mdFNoYXBlIHx8IChQQk5mdFNoYXBlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQk5mdFNoYXBlIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvbmZ0X3NoYXBlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgTmZ0U2hhcGVTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDQwLFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgY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CUG9pbnRlckV2ZW50cztcbihmdW5jdGlvbiAoUEJQb2ludGVyRXZlbnRzKSB7XG4gICAgZnVuY3Rpb24gZW5jb2RlKG1lc3NhZ2UsIHdyaXRlciA9IF9tMC5Xcml0ZXIuY3JlYXRlKCkpIHtcbiAgICAgICAgZm9yIChjb25zdCB2IG9mIG1lc3NhZ2UucG9pbnRlckV2ZW50cykge1xuICAgICAgICAgICAgUEJQb2ludGVyRXZlbnRzX0VudHJ5LmVuY29kZSh2LCB3cml0ZXIudWludDMyKDEwKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50cy5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCUG9pbnRlckV2ZW50cygpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJFdmVud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iAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJ1dHRvbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhvdmVyVGV4dCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhEaXN0YW5jZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNob3dGZWVkYmFjayA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtc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gICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJQb2ludGVyRXZlbnRzX0VudHJ5KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudFR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudEluZm8gPSBQQlBvaW50ZXJFdmVudHNfSW5mby5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuIC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AgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJ1dHRvbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdCA9IFJheWNhc3RIaXQuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGF0ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbmFsb2cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c1Jlc3VsdC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJFdmVudHNSZXN1bHQgfHwgKFBCUG9pbnRlckV2ZW50c1Jlc3VsdCA9IHt9KSk7XG4iLCAiLyogZXNsaW50LWRpc2FibGUgKi9cbmltcG9ydCBfbTAgZnJvbSBcInByb3RvYnVmanMvbWluaW1hbFwiO1xuaW1wb3J0IHsgVmVjdG9yMyB9IGZyb20gXCIuLi8uLi8uLi9jb21tb24vdmVjdG9ycy5nZW5cIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLnNkay5jb21wb25lbnRzLmNvbW1vblwiO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVJheWNhc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KCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb24gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZ2xvYmFsT3JpZ2luID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpcmVjdGlvbiA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ub3JtYWxIaXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVuZ3RoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaE5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW50aXR5SWQgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUmF5Y2FzdEhpdC5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BtZXNzYWdlID0gY3JlYXRlQmFzZVBCUG9pbnRlckxvY2soKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzUG9pbnRlckxvY2tlZCA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJQb2ludGVyTG9jay5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJMb2NrIHx8IChQQlBvaW50ZXJMb2NrID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlBvaW50ZXJMb2NrIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvcG9pbnRlcl9sb2NrLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgUG9pbnRlckxvY2tTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDc0LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQ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XIudWludDMyKDI2KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImdsb2JhbFRhcmdldFwiOlxuICAgICAgICAgICAgICAgIFZlY3RvcjMuZW5jb2RlKG1lc3NhZ2UuZGlyZWN0aW9uLmdsb2JhbFRhcmdldCwgd3JpdGVyLnVpbnQzMig1OCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJ0YXJnZXRFbnRpdHlcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDgwKS51aW50MzIobWVzc2FnZS5kaXJlY3Rpb24udGFyZ2V0RW50aXR5KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhEaXN0YW5jZSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5tYXhEaXN0YW5jZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucXVlcnlUeXBlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLnF1ZXJ5VHlwZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuY29udGludW91cyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDY0KS5ib29sKG1lc3NhZ2UuY29udGludW91cyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuY29sbGlzaW9uTWFzayAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDcyKS51aW50MzIobWVzc2FnZS5jb2xsaXNpb25NYXNrKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlJheWNhc3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlJheWNhc3QoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcmlnaW5PZmZzZXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJsb2NhbERpcmVjdGlvblwiLCBsb2NhbERpcmVjdGlvbjogVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJnbG9iYWxEaXJlY3Rpb25cIiwgZ2xvYmFsRGlyZWN0aW9uOiBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcImdsb2JhbFRhcmdldFwiLCBnbG9iYWxUYXJnZXQ6IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDEwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcInRhcmdldEVudGl0eVwiLCB0YXJnZXRFbnRpdHk6IHJlYWRlci51aW50MzIoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heERpc3RhbmNlID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucXVlcnlUeXBlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29udGludW91cyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgIC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IT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4KS51aW50MzIobWVzc2FnZS50aW1lc3RhbXApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmdsb2JhbE9yaWdpbiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBWZWN0b3IzLmVuY29kZShtZXNzYWdlLmdsb2JhbE9yaWdpbiwgd3JpdGVyLnVpbnQzMigxOCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5kaXJlY3Rpb24gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgVmVjdG9yMy5lbmNvZGUobWVzc2FnZS5kaXJlY3Rpb24sIHdyaXRlci51aW50MzIoMjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChjb25zdCB2IG9mIG1lc3NhZ2UuaGl0cykge1xuICAgICAgICAgICAgUmF5Y2FzdEhpdC5lbmNvZGUodiwgd3JpdGVyLnVpbnQzMigzNCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS50aWNrTnVtYmVyICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS51aW50MzIobWVzc2FnZS50aWNrTnVtYmVyKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlJheWNhc3RSZXN1bHQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlJheWNhc3RSZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nbG9iYWxPcmlnaW4gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdHMucHVzaChSYXljYXN0SGl0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpY2tOdW1iZXIgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJSYXljYXN0UmVzdWx0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCUmF5Y2FzdFJlc3VsdCB8fCAoUEJSYXljYXN0UmVzdWx0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlJheWNhc3RSZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9yYXljYXN0X3Jlc3VsdC5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFJheWNhc3RSZXN1bHRTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDY4L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ldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS50ZXh0ICE9PSBcIlwiKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEwKS5zdHJpbmcobWVzc2FnZS50ZXh0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mb250ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTYpLmludDMyKG1lc3NhZ2UuZm9udCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZm9udFNpemUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyOSkuZmxvYXQobWVzc2FnZS5mb250U2l6ZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZm9udEF1dG9TaXplICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzIpLmJvb2wobWVzc2FnZS5mb250QXV0b1NpemUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRleHRBbGlnbiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLnRleHRBbGlnbik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud2lkdGggIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig1MykuZmxvYXQobWVzc2FnZS53aWR0aCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNjEpLmZsb2F0KG1lc3NhZ2UuaGVpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wYWRkaW5nVG9wICE9PSB1bmRlZmluZWQpIHtcbiAgICA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oMTcwKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVGV4dFNoYXBlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUZXh0U2hhcGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnRBdXRvU2l6ZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nVG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1JpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxpbmVTcGFjaW5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5saW5lQ291bnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTEyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRXcmFwcGluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEyNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dCbHVyID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRYID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRZID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lV2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNoYWRvd0NvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTcwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVGV4dFNoYXBlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVGV4dFNoYXBlIHx8IChQQlRleHRTaGFwZSA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJUZXh0U2hhcGUgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy90ZXh0X3NoYXBlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVGV4dFNoYXBlU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTAzMCxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1a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WYgKG1lc3NhZ2UuZHVyYXRpb24gIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UuZHVyYXRpb24pO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmVhc2luZ0Z1bmN0aW9uICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE2KS5pbnQzMihtZXNzYWdlLmVhc2luZ0Z1bmN0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2UubW9kZT8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJtb3ZlXCI6XG4gICAgICAgICAgICAgICAgTW92ZS5lbmNvZGUobWVzc2FnZS5tb2RlLm1vdmUsIHdyaXRlci51aW50MzIoMjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwicm90YXRlXCI6XG4gICAgICAgICAgICAgICAgUm90YXRlLmVuY29kZShtZXNzYWdlLm1vZGUucm90YXRlLCB3cml0ZXIudWludDMyKDM0KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInNjYWxlXCI6XG4gICAgICAgICAgICAgICAgU2NhbGUuZW5jb2RlKG1lc3NhZ2UubW9kZS5zY2FsZSwgd3JpdGVyLnVpbnQzMig0MikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wbGF5aW5nICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDgpLmJvb2wobWVzc2FnZS5wbGF5aW5nKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5jdXJyZW50VGltZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDYxKS5mbG9hdChtZXNzYWdlLmN1cnJlbnRUaW1lKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlR3ZWVuLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUd2VlbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmR1cmF0aW9uID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZWFzaW5nRnVuY3Rpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0geyAkY2FzZTogXCJtb3ZlXCIsIG1vdmU6IE1vdmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSB7ICRjYXNlOiBcInJvdGF0ZVwiLCByb3RhdGU6IFJvdGF0ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kZSA9IHsgJGNhc2U6IFwic2NhbGVcIiwgc2NhbGU6IFNjYWxlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jdXJyZW50VGltZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVHdlZW4uZGVjb2RlID0gZGVjb2RlO1xufSkoUEJUd2VlbiB8fCAoUEJUd2VlbiA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlTW92ZSgpIHtcbiAgICByZXR1cm4geyBzdGFydDogdW5kZWZpbmVkLCBlbmQ6IHVuZGVmaW5lZCwgZmFjZURpcmVjdGlvbjogdW5kZWZpbmVkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBNb3ZlO1xuKGZ1bmN0aW9uIChNb3ZlKSB7XG4gICAgZnVuY3Rpb24gZW5jb2RlKG1lc3NhZ2UsIHdyaXRlciA9IF9tMC5Xcml0ZXIuY3JlYXRlKCkpIHtcbiAgICAgICAgaWYgKG1lc3NhZ2Uuc3RhcnQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgVmVjdG9yMy5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ICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGFydCA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmFjZURpcmVjdGlvbiA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgTW92ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShNb3ZlIHx8IChNb3ZlID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VSb3RhdGUoKSB7XG4gICAgcmV0dXJuIHsgc3RhcnQ6IHVuZGVmaW5lZCwgZW5kOiB1bmRlZmluZWQgfT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ICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3RhcnQgPSBRdWF0ZXJuaW9uLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW5kID0gUXVhdGVybmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFJvdGF0ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShSb3RhdGUgfHwgKFJvdGF0ZSA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlU2NhbGUoKSB7XG4gICAgcmV0dXJuIHsgc3RhcnQ6IHVuZGVmaW5lZCwgZW5kOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFNjYWxlO1xuKGZ1bmN0aW9uIChTY2FsZSkge1xuICAgIGZ1bmN0aW9uIGVuY29kZSh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gICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGFydCA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgU2NhbGUuZGVjb2RlID0gZGVjb2RlO1xufSkoU2NhbGUgfHwgKFNjYWxlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlR3ZWVuIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdHdlZW4uZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBUd2VlblNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDExMDIsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCVHdlZW4uZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3Jp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2UgPSBjcmVhdGVCYXNlUEJUd2VlblNlcXVlbmNlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2VxdWVuY2UucHVzaChQQlR3ZWVuLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQlR3ZWVuU2VxdWVuY2UuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJUd2VlblNlcXVlbmNlIHx8IChQQlR3ZWVuU2VxdWVuY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCVHdlZW5TZXF1Z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wKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIxKS5mbG9hdChtZXNzYWdlLmN1cnJlbnRUaW1lKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlR3ZWVuU3RhdGUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlR3ZWVuU3RhdGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY3VycmVudFRpbW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tcbiAgICAgICAgICAgIEJvcmRlclJlY3QuZW5jb2RlKG1lc3NhZ2UudGV4dHVyZVNsaWNlcywgd3JpdGVyLnVpbnQzMigzNCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICB3cml0ZXIudWludDMyKDQyKS5mb3JrKCk7XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLnV2cykge1xuICAgICAgICAgICAgd3JpdGVyLmZsb2F0KHYpO1xuICAgICAgICB9XG4gICAgICAgIHdyaXRlci5sZGVsaW0oKTtcbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJVaUJhY2tncm91bmQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpQmFja2dyb3VuZCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHR1cmVNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZVNsaWNlcyA9IEJvcmRlclJlY3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2cy5wdXNoKHJlYWRlci5mbG9hdCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaUJhY2tncm91bmQuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJVaUJhY2tncm91bmQgfHwgKFBCVWlCYWNrZ3JvdW5kID0ge30pKTtcbiIsICIvKiBlc2xpbnQtZGlzYWJsZSAqL1xuaW1wb3J0IF9tMCBmcm9tIFwicHJvdG9idWZqcy9taW5pbWFsXCI7XG5jb25zdCBwcm90b2J1ZlBhY2thZ2VTYXJhc2EgPSBcImRlY2VudHJhbGFuZC5jb21tb25cIjtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VCb3JkZXJSZWN0KCkge1xuICAgIHJldHVybiB7IHRvcDogMCwgbGVmdDogMCwgcmlnaHQ6IDAsIGJvdHRvbTogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgQm9yZGVy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7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYm90dG9tID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgQm9yZGVyUmVjdC5kZWNvZGUgPSBkZWNvZGU7XG59KShCb3JkZXJSZWN0IHx8IChCb3JkZXJSZWN0ID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VSZWN0KCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAsIHdpZHRoOiAwLCBoZWlnaHQ6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFJlY3Q7XG4oZnVuY3Rpb24gKFJlY3QpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS54ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLngpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UueSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud2lkdGggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2Uud2lkdGgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmhlaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5oZWlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFJlY3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VSZWN0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53aWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFJlY3QuZGVjb2RlID0gZGVjb2RlO1xufSkoUmVjdCB8fCAoUmVjdCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaUJhY2tncm91bmQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV9iYWNrZ3JvdW5kLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVWlCYWNrZ3JvdW5kU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA1MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaUJhY2tncm91bmQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdG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sZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpQ2FudmFzSW5mb3JtYXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kZXZpY2VQaXhlbFJhdGlvID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5pbnRlcmFjdGFibGVBcmVhID0gQm9yZGVyUmVjdC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVWlDYW52YXNJbmZvcm1hdGlvbi5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlVpQ2FudmFzSW5mb3JtYXRpb24gfHwgKFBCVWlDYW52YXNJbmZvcm1hdGlvbiA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaUNhbnZhc0luZm9ybWF0aW9uIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdWlfY2FudmFzX2luZm9ybWF0aW9uLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVWlDYW52YXNJbmZvcm1hdGlvblNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDEwNTQsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCVWlDYW52YXNJbmZvcm1hdGlvbi5lbmNvZGUodmFsdWUpO1xuICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgVWludDhBcnJheSh3cml0ZXIuZmluaXNoKCksIDAsIHdyaX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G9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hY2NlcHRFbXB0eSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1wdHlMYWJlbCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcHRpb25zLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zZWxlY3RlZEluZGV4ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlzYWJsZWQgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDExOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnRTaXplID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlEcm9wZG93biB8fCAoUEJVaURyb3Bkb3duID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlVpRHJvcGRvd24gfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV9kcm9wZG93bi5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFVpRHJvcGRvd25TY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDk0LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQlVpRHJvcGRvd24uZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gUEJVaURyb3Bkb3duLmR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RHJvcGRvd25SZXN1bHQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpRHJvcGRvd25SZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duUmVzdWx0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlEcm9wZG93blJlc3VsdCB8fCAoUEJVa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yaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucGxhY2Vob2xkZXJDb2xvciAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBDb2xvcjQuZW5jb2RlKG1lc3NhZ2UucGxhY2Vob2xkZXJDb2xvciwgd3JpdGVyLnVpbnQzMigyNikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5kaXNhYmxlZCA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzMikuYm9vbChtZXNzYWdlLmRpc2FibGVkKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS50ZXh0QWxpZ24gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS50ZXh0QWxpZ24pO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmZvbnQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4OCkuaW50MzIobWVzc2FnZS5mb250KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mb250U2l6ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDk2KS5pbnQzMihtZXNzYWdlLmZvbnRTaXplKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS52YWx1ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEwNikuc3RyaW5nKG1lc3NhZ2UudmFsdWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVWlJbnB1dC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYWNlaG9sZGVyID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxhY2Vob2xkZXJDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc2FibGVkID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZm9udFNpemUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTA2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVWlJbnB1dC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlVpSW5wdXQgfHwgKFBCVWlJbnB1dCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaUlucHV0IH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdWlfaW5wdXQuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBVaUlucHV0U2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA5MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaUlucHV0LmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVCdWZmZXIoYnVmZmVyLCBmYWxzZSk7XG4gICAgfSx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zIoMTApLnN0cmluZyhtZXNzYWdlLnZhbHVlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5pc1N1Ym1pdCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE2KS5ib29sKG1lc3NhZ2UuaXNTdWJtaXQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVWlJbnB1dFJlc3VsdC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dFJlc3VsdCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzU3VibWl0ID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQlVpSW5wdXRSZXN1bHQuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJVaUlucHV0UmVzdWx0IHx8IChQQlVpSW5wdXRSZXN1bHQgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCVWlJbnB1dFJlc3VsdCB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL3VpX2lucHV0X3Jlc3VsdC5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFVpSW5wdXRSZXN1bHRTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDk1LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQlVpSW5wdXRSZXN1bHQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1c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G4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJVaVRleHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52YWx1ZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVWlUZXh0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlUZXh0IHx8IChQQlVpVGV4dCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaVRleHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV90ZXh0Lmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVWlUZXh0U2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA1MixcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaVRleHQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYn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ICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mbGV4V3JhcCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLmZsZXhXcmFwKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mbGV4U2hyaW5rICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNTMpLmZsb2F0KG1lc3NhZ2UuZmxleFNocmluayk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25UeXBlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDU2KS5pbnQzMihtZXNzYWdlLnBvc2l0aW9uVHlwZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYWxpZ25TZWxmICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDY0KS5pbnQzMihtZXNzYWdlLmFsaWduU2VsZik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleERpcmVjdGlvbiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig3MikuaW50MzIobWVzc2FnZS5mbGV4RGlyZWN0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5qdXN0aWZ5Q29udGVudCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS5qdXN0aWZ5Q29udGVudCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uub3ZlcmZsb3cgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODgpLmludDMyKG1lc3NhZ2Uub3ZlcmZsb3cpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmRpc3BsYXkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOTYpLmludDMyKG1lc3NhZ2UuZGlzcGxheSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDQpLmludDMyKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExNykuZmxvYXQobWVzc2FnZS5mbGV4QmFzaXMpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmZsZXhHcm93ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyNSkuZmxvYXQobWVzc2FnZS5mbGV4R3Jvdyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud2lkdGhVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyOCkuaW50MzIobWVzc2FnZS53aWR0aFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLndpZHRoICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE0MSkuZmxvYXQobWVzc2FnZS53aWR0aCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNDQpLmludDMyKG1lc3NhZ2UuaGVpZ2h0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE1NykuZmxvYXQobWVzc2FnZS5oZWlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbldpZHRoVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNjApLmludDMyKG1lc3NhZ2UubWluV2lkdGhVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5taW5XaWR0aCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNzMpLmZsb2F0KG1lc3NhZ2UubWluV2lkdGgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTc2KS5pbnQzMihtZXNzYWdlLm1pbkhlaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxODkpLmZsb2F0KG1lc3NhZ2UubWluSGVpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhXaWR0aFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTkyKS5pbnQzMihtZXNzYWdlLm1heFdpZHRoVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWF4V2lkdGggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjA1KS5mbG9hdChtZXNzYWdlLm1heFdpZHRoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIwOCkuaW50MzIobWVzc2FnZS5tYXhIZWlnaHRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjIxKS5mbG9hdChtZXNzYWdlLm1heEhlaWdodCk7XG4gICAgICAgIH1c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AgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uQm90dG9tICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI4NSkuZmxvYXQobWVzc2FnZS5wb3NpdGlvbkJvdHRvbSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luTGVmdFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjg4KS5pbnQzMihtZXNzYWdlLm1hcmdpbkxlZnRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5MZWZ0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwMSkuZmxvYXQobWVzc2FnZS5tYXJnaW5MZWZ0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3BVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwNCkuaW50MzIobWVzc2FnZS5tYXJnaW5Ub3BVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3AgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzE3KS5mbG9hdChtZXNzYWdlLm1hcmdpblRvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luUmlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMyMCkuaW50MzIobWVzc2FnZS5tYXJnaW5SaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1hcmdpblJpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMzMykuZmxvYXQobWVzc2FnZS5tYXJnaW5SaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luQm90dG9tVW5pdCAhPT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AgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFyZW50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucmlnaHRPZiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduQ29udGVudCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduSXRlbXMgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4V3JhcCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhTaHJpbmsgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2NCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbGlnblNlbGYgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4RGlyZWN0aW9uID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmp1c3RpZnlDb250ZW50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm92ZXJmbG93ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc3BsYXkgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpc1VuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTE3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMjUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmxleEdyb3cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndpZHRoVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTQ0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNjApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluV2lkdGhVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE3Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5taW5XaWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNzYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxODkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE5Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhXaWR0aFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heFdpZHRoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIwOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblRvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25SaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjY5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjcyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uQm90dG9tVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyODUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Cb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkxlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5MZWZ0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzIwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpblJpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMzMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWFyZ2luUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzM2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQ5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNTIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM2NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNjgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1RvcFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0NzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0ODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzg0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzk3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDUwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0JvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJGaWx0ZXIgPSByZWFkZXIuaW50Mz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YgKG1lc3NhZ2UudmlkZW9MZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzcpLmZsb2F0KG1lc3NhZ2UudmlkZW9MZW5ndGgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnN0YXRlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLnN0YXRlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlZpZGVvRXZlbnQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlZpZGVvRXZlbnQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmN1cnJlbnRPZmZzZXQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aWRlb0xlbmd0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAg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MigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvbiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZvbHVtZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYXliYWNrUmF0ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVmlkZW9QbGF5ZXIuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJWaWRlb1BsYXllciB8fCAoUEJWaWRlb1BsYXllciA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJWaWRlb1BsYXllciB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL3ZpZGVvX3BsYXllci5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFZpZGVvUGxheWVyU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJWaWRlb1BsYXllci5lbmNvZGUodmFsdWUpO1xu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dW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS52aXNpYmxlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuYm9vbChtZXNzYWdlLnZpc2libGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVmlzaWJpbGl0eUNvbXBvbmVudC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVmlzaWJpbGl0eUNvbXBvbmVudCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudmlzaWJsZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA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AgLyoqXG4gICAgICogQHJldHVybnMgVGhlIHR1cGxlIFthbmltYXRvciwgY2xpcF1cbiAgICAgKi9cbiAgICBmdW5jdGlvbiBnZXRDbGlwQW5kQW5pbWF0b3IoZW50aXR5LCBjbGlwTmFtZSkge1xuICAgICAgICBjb25zdCBhbmltID0gdGhlQ29tcG9uZW50LmdldE11dGFibGVPck51bGwoZW50aXR5KTtcbiAgICAgICAgaWYgKCFhbmltKVxuICAgICAgICAgICAgcmV0dXJuIFtudWxsLCBudWxsXTtcbiAgICAgICAgY29uc3Qgc3RhdGUgPSBhbmltLnN0YXRlcy5maW5kKChpdGVtKSA9PiBpdGVtLmNsaXAgPT09IGNsaXBOYW1lKTtcbiAgICAgICAgaWYgKCFzdGF0ZSlcbiAgICAgICAgICAgIHJldHVybiBbYW5pbSwgbnVsbF07XG4gICAgICAgIHJldHVybiBbYW5pbSwgc3RhdGVdO1xuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50aGVDb21wb25lbnQsXG4gICAgICAgIGdldENsaXBPck51bGwoZW50aXR5LCBjbGlwTmFtZSkge1xuICAgICAgICAgICAgY29uc3QgW18sIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIHJldHVybiBzdGF0ZTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q2xpcChlbnRpdHksIGNsaXBOYW1lKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFRoZXJlIGlzIG5vIEFuaW1hdG9yIGZvdW5kIGluIHRoZSBlbnRpdHkgJHtlbnRpdHl9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIXN0YXRlKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgQW5pbWF0b3IgY29tcG9uZW50IG9mICR7ZW50aXR5fSBoYXMgbm8gdGhlIHN0YXRlICR7Y2xpcE5hbWV9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RhdGU7XG4gICAgICAgIH0sXG4gICAgICAgIHBsYXlTaW5nbGVBbmltYXRpb24oZW50aXR5LCBjbGlwTmFtZSwgc2hvdWxkUmVzZXQgPSB0cnVlKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IgfHwgIXN0YXRlKVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIC8vIFJlc2V0IGFsbCBvdGhlciBhbmltYXRpb25zXG4gICAgICAgICAgICBmb3IgKGNvbnN0IHN0YXRlIG9mIGFuaW1hdG9yLnN0YXRlcykge1xuICAgICAgICAgICAgICAgIHN0YXRlLnBsYXlpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBzdGF0ZS5zaG91bGRSZXNldCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzdGF0ZS5wbGF5aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gc2hvdWxkUmVzZXQ7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfSxcbiAgICAgICAgc3RvcEFsbEFuaW1hdGlvbnMoZW50aXR5LCByZXNldEN1cnNvciA9IHRydWUpIHtcbiAgICAgICAgICAgIC8vIEdldCB0aGUgbXV0YWJsZSB0byBtb2RpZnlpbmdcbiAgICAgICAgICAgIGNvbnN0IGFuaW1hdG9yID0gdGhlQ29tcG9uZW50LmdldE11dGFibGVPck51bGwoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgLy8gUmVzZXQgYWxsIG90aGVyIGFuaW1hdGlvbnNcbiAgICAgICAgICAgIGZvciAoY29uc3Qgc3RhdGUgb2YgYW5pbWF0b3Iuc3RhdGVzKSB7XG4gICAgICAgICAgICAgICAgc3RhdGUucGxheWluZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gcmVzZXRDdXJzb3I7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWF0ZXJpYWwgfSBmcm9tICcuLi9nZW5lcmF0ZWQvaW5kZXguZ2VuJztcbmNvbnN0IFRleHR1cmVIZWxwZXIgPSB7XG4gICAgQ29tbW9uKHRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAndGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgQXZhdGFyKGF2YXRhclRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAnYXZhdGFyVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgYXZhdGFyVGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgVmlkZW8odmlkZW9UZXh0dXJlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0ZXg6IHtcbiAgICAgICAgICAgICAgICAkY2FzZTogJ3ZpZGVvVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdmlkZW9UZXh0dXJlXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVNYXRlcmlhbENvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBNYXRlcmlhbChlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgVGV4dHVyZTogVGV4dHVyZUhlbHBlcixcbiAgICAgICAgc2V0QmFzaWNNYXRlcmlhbChlbnRpdHksIG1hdGVyaWFsKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1hdGVyaWFsOiB7XG4gICAgICAgICAgICAgICAgICAgICRjYXNlOiAndW5saXQnLFxuICAgICAgICAgICAgICAgICAgICB1bmxpdDogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGJyTWF0ZXJpYWwoZW50aXR5LCBtYXRlcmlhbCkge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtYXRlcmlhbDoge1xuICAgICAgICAgICAgICAgICAgICAkY2FzZTogJ3BicicsXG4gICAgICAgICAgICAgICAgICAgIHBicjogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWVzaENvbGxpZGVyIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5leHBvcnQgZnVuY3Rpb24gZGVmaW5lTWVzaENvbGxpZGVyQ29tcG9uZW50KGVuZ2luZSkge1xuICAgIGNvbnN0IHRoZUNvbXBvbmVudCA9IE1lc2hDb2xsaWRlcihlbmdpbmUpO1xuICAgIGZ1bmN0aW9uIGdldENvbGxpc2lvbk1hc2sobGF5ZXJzKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxheWVycykpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnMubWFwKChpdGVtKSA9PiBpdGVtKS5yZWR1Y2UoKHByZXYsIGl0ZW0pID0+IHByZXYgfCBpdGVtLCAwKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChsYXllcnMpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnM7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLi4udGhlQ29tcG9uZW50LFxuICAgICAgICBzZXRCb3goZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAnYm94JywgYm94OiB7fSB9LFxuICAgICAgICAgICAgICAgIGNvbGxpc2lvbk1hc2s6IGdldENvbGxpc2lvbk1hc2soY29sbGlkZXJMYXllcnMpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGxhbmUoZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAncGxhbmUnLCBwbGFuZToge30gfSxcbiAgICAgICAgICAgICAgICBjb2xsaXNpb25NYXNrOiBnZXRDb2xsaXNpb25NYXNrKGNvbGxpZGVyTGF5ZXJzKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldEN5bGluZGVyKGVudGl0eSwgcmFkaXVzQm90dG9tLCByYWRpdXNUb3AsIGNvbGxpZGVyTGF5ZXJzKSB7XG4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gICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBzZXRQbGFuZShlbnRpdHksIHV2cykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAncGxhbmUnLCBwbGFuZTogeyB1dnM6IHV2cyB8fCBbXSB9IH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBzZXRDeWxpbmRlcihlbnRpdHksIHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdjeWxpbmRlcicsIGN5bGluZGVyOiB7IHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wIH0gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldFNwaGVyZShlbnRpdHkpIHtcbiAgICAgICAgICAgIHRoZUNvbXBvbmVudC5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB7XG4gICAgICAgICAgICAgICAgbWVzaDogeyAkY2FzZTogJ3NwaGVyZScsIHNwaGVyZToge30gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFR3ZWVuIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5jb25zdCBUd2VlbkhlbHBlciA9IHtcbiAgICBNb3ZlKG1vdmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICRjYXNlOiAnbW92ZScsXG4gICAgICAgICAgICBtb3ZlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBSb3RhdGUocm90YXRlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3JvdGF0ZScsXG4gICAgICAgICAgICByb3RhdGVcbiAgICAgICAgfTtcbiAgICB9LFxuICAgIFNjYWxlKHNjYWxlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3NjYWxlJyxcbiAgICAgICAgICAgIHNjYWxlXG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVUd2VlbkNvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBUd2VlbihlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgTW9kZTogVHdlZW5IZWxwZXJcbiAgICB9O1xufVxuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJQXJyYXkgPSAodHlwZSkgPT4ge1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgYnVpbGRlci53cml0ZVVpbnQzMih2YWx1ZS5sZW5ndGgpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpdGVtIG9mIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdHlwZS5zZXJpYWxpemUoaXRlbSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3QXJyYXkgPSBbXTtcbiAgICAgICAgICAgIGNvbnN0IGxlbmd0aCA9IHJlYWRlci5yZWFkVWludDMyKCk7XG4gICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgbGVuZ3RoOyBpbmRleCsrKSB7XG4gICAgICAgICAgICAgICAgbmV3QXJyYXkucHVzaCh0eXBlLmRlc2VyaWFsaXplKHJlYWRlcikpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld0FycmF5O1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgICBpdGVtczogdHlwZS5qc29uU2NoZW1hLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdhcnJheSdcbiAgICAgICAgfVxuICAgIH07XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBCb29sID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50OCh2YWx1ZSA/IDEgOiAwKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQ4KCkgPT09IDE7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2Jvb2xlYW4nLFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2Jvb2xlYW4nXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSW50NjQgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ2NChCaWdJbnQodmFsdWUpKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gTnVtYmVyKHJlYWRlci5yZWFkSW50NjQoKSk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnaW50NjQnXG4gICAgfVxufTtcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJbnQzMiA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUludDMyKHZhbHVlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQzMigpO1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4gMDtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2ludGVnZXInLFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2ludDMyJ1xuICAgIH1cbn07XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IGNvbnN0IEludDE2ID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50MTYodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDE2KCk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnaW50MTYnXG4gICAgfVxufTtcbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgY29uc3QgSW50OCA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUludDgodmFsdWUpO1xuICA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gICAgIGc6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgIGI6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICB9LFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2NvbG9yMydcbiAgICB9XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBDb2xvcjRTY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLnIpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS5nKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUuYik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLmEpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByOiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIGc6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgYjogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICBhOiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyByOiAwLCBnOiAwLCBiOiAwLCBhOiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICByOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBnOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBiOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBhOiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdjb2xvcjQnXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgRW50aXR5U2NoZW1hID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50MzIodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDMyKCk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnZW50aXR5J1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFF1YXRlcm5pb25TY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLngpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS55KTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUueik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLncpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB4OiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIHk6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgejogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICB3OiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyB4OiAwLCB5OiAwLCB6OiAwLCB3OiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB4OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB6OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB3OiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdxdWF0ZXJuaW9uJ1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFZlY3RvcjNTY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLngpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS55KTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUueik7XG4gICAgfSxcbiAgICBkZXNlcmlhbGl6ZShyZWFkZXIpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHg6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgeTogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICB6OiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyB4OiAwLCB5OiAwLCB6OiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB4OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB6OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB3OiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICd2ZWN0b3IzJ1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IElNYXAgPSAoc3BlYywgZGVmYXVsdFZhbHVlKSA9PiB7XG4gICAgY29uc3Qgc3BlY1JlZmxlY3Rpb24gPSBPYmplY3Qua2V5cyhzcGVjKS5yZWR1Y2UoKHNwZWNSZWZsZWN0aW9uLCBjdXJyZW50S2V5KSA9PiB7XG4gICAgICAgIHNwZWNSZWZsZWN0aW9uW2N1cnJlbnRLZXldID0gc3BlY1tjdXJyZW50S2V5XS5qc29uU2NoZW1hO1xuICAgICAgICByZXR1cm4gc3BlY1JlZmxlY3Rpb247XG4gICAgfSwge30pO1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIHNwZWNba2V5XS5zZXJpYWxpemUodmFsdWVba2V5XSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSB7fTtcbiAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIHNwZWMpIHtcbiAgICAgICAgICAgICAgICA7XG4gICAgICAgICAgICAgICAgbmV3VmFsdWVba2V5XSA9IHNwZWNba2V5XS5kZXNlcmlhbGl6ZShyZWFkZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld1ZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSB9O1xuICAgICAgICB9LFxuICAgICAgICBleHRlbmQ6IChiYXNlKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSwgLi4uYmFzZSB9O1xuICAgICAgICB9LFxuICAgICAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgICAgIHByb3BlcnRpZXM6IHNwZWNSZWZsZWN0aW9uLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdtYXAnXG4gICAgICAgIH1cbiAgICB9O1xufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSU9wdGlvbmFsID0gKHNwZWMpID0+IHtcbiAgICByZXR1cm4ge1xuICAgICAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDEpO1xuICAgICAgICAgICAgICAgIHNwZWMuc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBkZXNlcmlhbGl6ZShyZWFkZXIpIHtcbiAgICAgICAgICAgIGNvbnN0IGV4aXN0cyA9IHJlYWRlci5yZWFkSW50OCgpO1xuICAgICAgICAgICAgaWYgKGV4aXN0cykge1xuICAgICAgICAgICAgICAgIHJldHVybiBzcGVjLmRlc2VyaWFsaXplKHJlYWRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNyZWF0ZSgpIHtcbiAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6IHNwZWMuanNvblNjaGVtYS50eXBlLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdvcHRpb25hbCcsXG4gICAgICAgICAgICBvcHRpb25hbEpzb25TY2hlbWE6IHNwZWMuanNvblNjaGVtYVxuICAgICAgICB9XG4gICAgfTtcbn07XG4iLCAiZXhwb3J0IGNvbnN0IElPbmVPZiA9IChzcGVjcykgPT4ge1xuICAgIGNvbnN0IHNwZWNLZXlzID0gT2JqZWN0LmtleXMoc3BlY3MpO1xuICAgIGNvbnN0IGtleVRvSW5kZXggPSBzcGVjS2V5cy5yZWR1Y2UoKGRpY3QsIGtleSwgaW5kZXgpID0+IHtcbiAgICAgICAgZGljdFtrZXldID0gaW5kZXg7XG4gICAgICAgIHJldHVybiBkaWN0O1xuICAgIH0sIHt9KTtcbiAgICBjb25zdCBzcGVjUmVmbGVjdGlvbiA9IHNwZWNLZXlzLnJlZHVjZSgoc3BlY1JlZmxlY3Rpb24sIGN1cnJlbnRLZXkpID0+IHtcbiAgICAgICAgc3BlY1JlZmxlY3Rpb25bY3VycmVudEtleV0gPSBzcGVjc1tjdXJyZW50S2V5XS5qc29uU2NoZW1hO1xuICAgICAgICByZXR1cm4gc3BlY1JlZmxlY3Rpb247XG4gICAgfSwge30pO1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh7ICRjYXNlLCB2YWx1ZSB9LCBidWlsZGVyKSB7XG4gICAgICAgICAgICBjb25zdCBfdmFsdWUgPSBrZXlUb0luZGV4WyRjYXNlLnRvU3RyaW5nKCldICsgMTtcbiAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVVaW50OChfdmFsdWUpO1xuICAgICAgICAgICAgc3BlY3NbJGNhc2VdLnNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcik7XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgJGNhc2UgPSBzcGVjS2V5c1tyZWFkZXIucmVhZEludDgoKSAtIDFdO1xuICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBzcGVjc1skY2FzZV0uZGVzZXJpYWxpemUocmVhZGVyKTtcbiAgICAgICAgICAgIHJldHVybiB7ICRjYXNlLCB2YWx1ZSB9O1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgcHJvcGVydGllczogc3BlY1JlZmxlY3Rpb24sXG4gICAgICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ29uZS1vZidc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VyLnNldEZsb2F0MzIocHRyICsgMjgsIHZhbHVlLnNjYWxlLngpO1xuICAgICAgICBidWlsZGVyLnNldEZsb2F0MzIocHRyICsgMzIsIHZhbHVlLnNjYWxlLnkpO1xuICAgICAgICBidWlsZGVyLnNldEZsb2F0MzIocHRyICsgMzYsIHZhbHVlLnNjYWxlLnopO1xuICAgICAgICBidWlsZGVyLnNldFVpbnQzMihwdHIgKyA0MCwgdmFsdWUucGFyZW50IHx8IDApO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIGNvbnN0IHB0ciA9IHJlYWRlci5pbmNyZW1lbnRSZWFkT2Zmc2V0KFRSQU5TRk9STV9MRU5HVEgpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIpLFxuICAgICAgICAgICAgICAgIHk6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDQpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDgpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcm90YXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAxMiksXG4gICAgICAgICAgICAgICAgeTogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMTYpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDIwKSxcbiAgICAgICAgICAgICAgICB3OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAyNClcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHg6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDI4KSxcbiAgICAgICAgICAgICAgICB5OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAzMiksXG4gICAgICAgICAgICAgICAgejogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMzYpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcGFyZW50OiByZWFkZXIuZ2V0VWludDMyKHB0ciArIDQwKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcG9zaXRpb246IHsgeDogMCwgeTogMCwgejogMCB9LFxuICAgICAgICAgICAgc2NhbGU6IHsgeDogMSwgeTogMSwgejogMSB9LFxuICAgICAgICAgICAgcm90YXRpb246IHsgeDogMCwgeTogMCwgejogMCwgdzogMSB9LFxuICAgICAgICAgICAgcGFyZW50OiAwXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBleHRlbmQodmFsdWUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHBvc2l0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAgfSxcbiAgICAgICAgICAgIHNjYWxlOiB7IHg6IDEsIHk6IDEsIHo6IDEgfSxcbiAgICAgICAgICAgIHJvdGF0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAsIHc6IDEgfSxcbiAgICAgICAgICAgIHBhcmVudDogMCxcbiAgICAgICAgICAgIC4uLnZhbHVlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByb3RhdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgICAgICAgICAgdzogeyB0eXBlOiAnbnVtYmVyJyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHBhcmVudDogeyB0eXBlOiAnaW50ZWdlcicgfVxuICAgICAgICB9LFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ3RyYW5zZm9ybSdcbiAgICB9XG59O1xuZXhwb3J0IGZ1bmN0aW9uIGRlZmluZVRyYW5zZm9ybUNvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0cmFuc2Zvcm1EZWYgPSBlbmdpbmUuZGVmaW5lQ29tcG9uZW50RnJvbVNjaGVtYSgnY29yZTo6VHJhbnNmb3JtJywgVHJhbnNmb3JtU2NoZW1hKTtcbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50cmFuc2Zvcm1EZWYsXG4gIC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9jZXNzID09PSAnb2JqZWN0JyAmJlxuICAgICAgICAocHJvY2Vzcy5lbnY/Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicgfHwgcHJvY2Vzcy5lbnY/Lk5PREVfRU5WID09PSAnZGV2ZWxvcG1lbnQnKSkgfHxcbiAgICBmYWxzZTtcbmV4cG9ydCBmdW5jdGlvbiBjaGVja05vdFRoZW5hYmxlKHQsIGVycm9yKSB7XG4gICAgaWYgKF9fREVWX18pIHtcbiAgICAgICAgaWYgKHQgJiYgdHlwZW9mIHQgPT09ICdvYmplY3QnICYmIHR5cGVvZiB0LnRoZW4gPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihlcnJvcik7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHQ7XG59XG4iLCAiLyoqXG4gKlxuICogQHJldHVybnMgYSBuZXcgR1NldFxuICovXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlVmVyc2lvbkdTZXQoKSB7XG4gICAgY29uc3QgbGFzdFZlcnNpb24gPSBuZXcgTWFwKCk7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSBudW1iZXJcbiAgICAgICAgICogQHBhcmFtIHZlcnNpb25cbiAgICAgICAgICogQHJldHVybnNcbiAgICAgICAgICovXG4gICAgICAgIGFkZFRvKG51bWJlciwgdmVyc2lvbikge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgIGlmICh2ZXJzaW9uIDwgMCkge1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgY3VycmVudFZhbHVlID0gbGFzdFZlcnNpb24uZ2V0KG51bWJlcik7XG4gICAgICAgICAgICAvLyBJZiB0aGUgdmVyc2lvbiBpcyA+PSwgaXQgbWVhbnMgdGhlIHZhbHVlIGl0J3MgYWxyZWFkeSBpbiB0aGUgc2V0XG4gICAgICAgICAgICBpZiAoY3VycmVudFZhbHVlICE9PSB1bmRlZmluZWQgJiYgY3VycmVudFZhbHVlID49IHZlcnNpb24pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxhc3RWZXJzaW9uLnNldChudW1iZXIsIHZlcnNpb24pO1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAcmV0dXJucyB0aGUgc2V0IHdpdGggW251bWJlciwgdmVyc2lvbl0gb2YgZWFjaCB2YWx1ZVxuICAgICAgICAgKi9cbiAgICAgICAgaGFzKG4sIHYpIHtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRWYWx1ZSA9IGxhc3RWZXJzaW9uLmdldChuKTtcbiAgICAgICAgICAgIC8vIElmIHRoZSB2ZXJzaW9uIGlzID49LCBpdCBtZWFucyB0aGUgdmFsdWUgaXQncyBhbHJlYWR5IGluIHRoZSBzZXRcbiAgICAgICAgICAgIGlmIChjdXJyZW50VmFsdWUgIT09IHVuZGVmaW5lZCAmJiBjdXJyZW50VmFsdWUgPj0gdikge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9LFxuICAgICAgICAvKipcbiAgICAgICAgICogV2FybmluZzogdGhpcyBmdW5jdGlvbiByZXR1cm5zIHRoZSByZWZlcmVuY2UgdG8gdGhlIGludGVybmFsIG1hcCxcbiAgICAgICAgICogIGlmIHlvdSBuZWVkIHRvIG11dGF0ZSBzb21lIHZhbHVlLCBtYWtlIGEgY29weS5cbiAgICAgICAgICogRm9yIG9wdGltaXphdGlvbiBwdX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ICAgICAgIGNvbnN0IGVudGl0eU51bWJlciA9IG5ldHdvcmtlZCA/IG5ldHdvcmtFbnRpdHlDb3VudGVyKysgOiBlbnRpdHlDb3VudGVyKys7XG4gICAgICAgIGNvbnN0IGVudGl0eVZlcnNpb24gPSByZW1vdmVkRW50aXRpZXMuZ2V0TWFwKCkuaGFzKGVudGl0eU51bWJlcilcbiAgICAgICAgICAgID8gcmVtb3ZlZEVudGl0aWVzLmdldE1hcCgpLmdldChlbnRpdHlOdW1iZXIpICsgMVxuICAgICAgICAgICAgOiAwO1xuICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKGVudGl0eU51bWJlciwgZW50aXR5VmVyc2lvbik7XG4gICAgICAgIGlmICh1c2VkRW50aXRpZXMuaGFzKGVudGl0eSkpIHtcbiAgICAgICAgICAgIHJldHVybiBnZW5lcmF0ZU5ld0VudGl0eSgpO1xuICAgICAgICB9XG4gICAgICAgIHVzZWRFbnRpdGllcy5hZGQoZW50aXR5KTtcbiAgICAgICAgcmV0dXJuIGVudGl0eTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ2VuZXJhdGVFbnRpdHkobmV0d29ya2VkKSB7XG4gICAgICAgIGlmIChuZXR3b3JrZWQgJiYgIW5ldHdvcmtlZEVudGl0aWVzUmFuZ2UpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTmV0d29yayBlbnRpdGllcyByYW5nZWQgbm90IGluaXRpYWxpemVkLiBDb25uZWN0IHRvIGEgQ1JEVCBTZXJ2ZXInKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB1c2VkTmV0d29ya1NpemUgPSAobmV0d29ya2VkRW50aXRpZXNSYW5nZSAmJlxuICAgICAgICAgICAgWy4uLnVzZWRFbnRpdGllcy52YWx1ZXMoKV0uZmlsdGVyKCgkKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgW2VudGl0eUlkXSA9IEVudGl0eVV0aWxzLmZyb21Fb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uICAgICAgICAgICAgICAgIGlmIChuZXR3b3JrZWQgJiYgKG51bWJlciA8IG5ldHdvcmtlZEVudGl0aWVzUmFuZ2VbMF0gfHwgbnVtYmVyID4gbmV0d29ya2VkRW50aXRpZXNSYW5nZVsxXSkpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGlmICghbmV0d29ya2VkICYmIG51bWJlciA+PSBsb2NhbEVudGl0aWVzQXZhaWxhYmxlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKG51bWJlciwgdmVyc2lvbiArIDEpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBlbnRpdHkgaXMgbm90IGJlaW5nIHVzZWQsIHdlIGNhbiByZS11c2UgaXRcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGUgZW50aXR5IHdhcyByZW1vdmVkIGluIHRoaXMgdGljaywgd2UncmUgbm90IGNvdW50aW5nIGZvciB0aGUgdXNlZEVudGl0aWVzLCBidXQgd2UgaGF2ZSBpdCBpbiB0aGUgdG9SZW1vdmVFbnRpdHlBcnJheVxuICAgICAgICAgICAgICAgIGlmICghdXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpICYmICF0b1JlbW92ZUVudGl0aWVzLmluY2x1ZGVzKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdXNlZEVudGl0aWVzLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW50aXR5O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ2VuZXJhdGVOZXdFbnRpdHkobmV0d29ya2VkKTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlRW50aXR5KGVudGl0eSkge1xuICAgICAgICBpZiAoZW50aXR5IDwgUkVTRVJWRURfU1RBVElDX0VOVElUSUVTKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICBpZiAodXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICB1c2VkRW50aXRpZXMuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICB0b1JlbW92ZUVudGl0aWVzLnB1c2goZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHVwZGF0ZVJlbW92ZWRFbnRpdHkoZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVsZWFzZVJlbW92ZWRFbnRpdGllcygpIHtcbiAgICAgICAgY29uc3QgYXJyID0gdG9SZW1vdmVFbnRpdGllcztcbiAgICAgICAgaWYgKGFyci5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRvUmVtb3ZlRW50aXRpZXMgPSBbXTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgZW50aXR5IG9mIGFycikge1xuICAgICAgICAgICAgICAgIGNvbnN0IFtuLCB2XSA9IEVudGl0eVV0aWxzLmZyb21FbnRpdHlJZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgIHJlbW92ZWRFbnRpdGllcy5hZGRUbyhuLCB2KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYXJyO1xuICAgIH1cbiAgICBmdW5jdGlvbiB1cGRhdGVSZW1vdmVkRW50aXR5KGVudGl0eSkge1xuICAgICAgICBjb25zdCBbbiwgdl0gPSBFbnRpdHlVdGlscy5mcm9tRW50aXR5SWQoZW50aXR5KTtcbiAgICAgICAgLy8gVXBkYXRlIHRoZSByZW1vdmVkIGVudGl0aWVzIG1hcFxuICAgICAgICByZW1vdmVkRW50aXRpZXMuYWRkVG8obiwgdik7XG4gICAgICAgIC8vIFJlbW92ZSB0aGUgdXNlZEVudGl0a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ICAgICAgICAvLyBXcml0ZSBDb21wb25lbnRPcGVyYXRpb24gaGVhZGVyXG4gICAgICAgIGJ1Zi5zZXRVaW50MzIoc3RhcnRNZXNzYWdlT2Zmc2V0ICsgOCwgZW50aXR5KTtcbiAgICAgICAgYnVmLnNldFVpbnQzMihzdGFydE1lc3NhZ2VPZmZzZXQgKyAxMiwgY29tcG9uZW50SWQpO1xuICAgICAgICBidWYuc2V0VWludDMyKHN0YXJ0TWVzc2FnZU9mZnNldCArIDE2LCB0aW1lc3RhbXApO1xuICAgIH1cbiAgICBEZWxldGVDb21wb25lbnQud3JpdGUgPSB3cml0ZTtcbiAgICBmdW5jdGlvbiByZWFkKGJ1Zikge1xuICAgICAgICBjb25zdCBoZWFkZXIgPSBDcmR0TWVzc2FnZVByb3RvY29sLnJlYWRIZWFkZXIoYnVmKTtcbiAgICAgICAgaWYgKCFoZWFkZXIpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgICAgIGlmIChoZWFkZXIudHlwZSAhPT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRGVsZXRlQ29tcG9uZW50T3BlcmF0aW9uIHRyaWVkIHRvIHJlYWQgYW5vdGhlciBtZXNzYWdlIHR5cGUuJyk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbXNnID0ge1xuICAgICAgICAgICAgLi4uaGVhZGVyLFxuICAgICAgICAgICAgZW50aXR5SWQ6IGJ1Zi5yZWFkVWludDMyKCksXG4gICAgICAgICAgICBjb21wb25lbnRJZDogYnVmLnJlYWRVaW50MzIoKSxcbiAgICAgICAgICAgIHRpbWVzdGFtcDogYnVmLnJlYWRVaW50MzIoKVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gbXNnO1xuICAgIH1cbiAgICBEZWxldGVDb21wb25lbnQucmVhZCA9IHJlYWQ7XG59KShEZWxldGVDb21wb25lb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JkdE1lc3NhZ2VQcm90b2NvbC5nZXRIZWFkZXIoYnVmZmVyKSkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBvZmZzZXQgPSBidWZmZXIuY3VycmVudFJlYWRPZmZzZXQoKTtcbiAgICAgICAgICAgICAgICBsZXQgbWVzc2FnZSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfQ09NUE9ORU5UKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBEZWxldGVDb21wb25lbnQucmVhZChidWZmZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChoZWFkZXIudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlRfTkVUV09SSykge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gRGVsZXRlQ29tcG9uZW50TmV0d29yay5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCkge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gUHV0Q29tcG9uZW50T3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UX05FVFdPUkspIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IFB1dE5ldHdvcmtDb21wb25lbnRPcGVyYXRpb24ucmVhZChidWZmZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChoZWFkZXIudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9FTlRJVFkpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IERlbGV0ZUVudGl0eS5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0VOVElUWV9ORVRXT1JLKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBEZWxldGVFbnRpdHlOZXR3b3JrLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IEFwcGVuZFZhbHVlT3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gVW5rbm93biBtZXNzYWdlLCB3ZSBza2lwIGl0XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBjb25zdW1lIHRoZSBtZXNzYWdlXG4gICAgICAgICAgICAgICAgICAgIGJ1ZmZlci5pbmNyZW1lbnRSZWFkT2Zmc2V0KGhlYWRlci5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAobWVzc2FnZSkge1xuICAgICAgICAgICAgICAgICAgICByZWNlaXZlZE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zcG9ydElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZUJ1ZmZlcjogYnVmZmVyLmJ1ZmZlcigpLnN1YmFycmF5KG9mZnNldCwgYnVmZ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Gl0eSgpO1xuICAgICAgICAgICAgICAgIG5ldHdvcmsgPSB7IGVudGl0eUlkOiBtc2cuZW50aXR5SWQsIG5ldHdvcmtJZDogbXNnLm5ldHdvcmtJZCB9O1xuICAgICAgICAgICAgICAgIE5ldHdvcmtFbnRpdHkuY3JlYXRlT3JSZXBsYWNlKGVudGl0eUlkLCBuZXR3b3JrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtc2cudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9FTlRJVFkgfHwgbXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfRU5USVRZX05FVFdPUkspIHtcbiAgICAgICAgICAgICAgICBlbnRpdGllc1Nob3VsZEJlQ2xlYW5lZC5wdXNoKGVudGl0eUlkKTtcbiAgICAgICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHlTdGF0ZSA9IGVuZ2luZS5lbnRpdHlDb250YWluZXIuZ2V0RW50aXR5U3RhdGUoZW50aXR5SWQpO1xuICAgICAgICAgICAgICAgIC8vIFNraXAgdXBkYXRlcyBmcm9tIHJlbW92ZWQgZW50aXR5ZXNcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIC8vIEVudGl0aWVzIHdpdGggdW5rbm93biBlbnRpdGllcyBzaG91bGQgdXBkYXRlIGl0cyBlbnRpdHkgc3RhdGVcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlVua25vd24pIHtcbiAgICAgICAgICAgICAgICAgICAgZW5naW5lLmVudGl0eUNvbnRhaW5lci51cGRhdGVVc2VkRW50aXR5KGVudGl0eUlkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZW5naW5lLmdldENvbXBvbmVudE9yTnVsbChtc2cuY29tcG9uZW50SWQpO1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQuY29tcG9uZW50SWQgPT09IFRyYW5zZm9ybS5jb21wb25lbnRJZCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgTmV0d29ya0VudGl0eS5oYXMoZW50aXR5SWQpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBOZXR3b3JrUGFyZW50LmhhcyhlbnRpdHlJZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1zZy5kYXRhID0gbmV0d29ya1V0aWxzLmZpeFRyYW5zZm9ybVBhcmVudChtc2cpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IFtjb25mbGljdE1lc3NhZ2UsIHZhbHVlXSA9IGNvbXBvbmVudC51cGRhdGVGcm9tQ3JkdCh7IC4uLm1zZywgZW50aXR5SWQgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY29uZmxpY3RNZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBBZGQgbWVzc2FnZSB0byB0cmFuc3BvcnQgcXVldWUgdG8gYmUgcHJvY2Vzc2VkIGJ5IG90aGVycyB0cmFuc3BvcnRzXG4gICAgICAgICAgICAgICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBvblByb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09NUE9ORU5UKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBQdXRDb21wb25lbnRPcGVyYXRpb24ud3JpdGUobWVzc2FnZS5lbnRpdHlJZCwgbWVzc2FnZS50aW1lc3RhbXAsIG1lc3NhZ2UuY29tcG9uZW50SWQsIG1lc3NhZ2UuZGF0YSwgYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfQ09NUE9ORU5UKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBEZWxldGVDb21wb25lbnQud3JpdGUobWVzc2FnZS5lbnRpdHlJZCwgY29tcG9uZW50LmNvbXBvbmVudElkLCBtZXNzYWdlLnRpbWVzdGFtcCwgYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIEFwcGVuZFZhbHVlT3BlcmF0aW9uLndyaXRlKG1lc3NhZ2UuZW50aXR5SWQsIG1lc3NhZ2UudGltZXN0YW1wLCBtZXNzYWdlLmNvbXBvbmVudElkLCBtZXNzYWdlLmRhdGEsIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY3JkdE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VCdWZmZXI6IGJ1ZmZlci5idWZmZXIoKS5zdWJhcnJheShvZmZzZXQsIGJ1ZmZlci5jdXJyZW50V3JpdGVPZmZzZXQoKSlcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvblByb2Nlc3NFbnRpdHlDb21wb25lbnRDaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhd1ZhbHVlID0gbWVzc2FnZS50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCB8fCBtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGNvbXBvbmVudC5nZXQobWVzc2FnZS5lbnRpdHlJZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uUHJvY2Vzc0VudGl0eUNvbXBvbmVudENoYW5nZShtZXNzYWdlLmVudGl0eUlkLCBtZXNzYWdlLnR5cGUsIGNvbXBvbmVudCwgcmF3VmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIEFmdGVyIGFsbCB1cGRhdGVzLCBJIGV4ZWN1dGUgdGhlIERlbGV0ZWRFbnRpdHkgbWVzc2FnZXNcbiAgICAgICAgZm9yIChjb25zdCBlbnRpdHlJZCBvZiBlbnRpdGllc0RlbGV0ZWRUaGlzVGljaykge1xuICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gYnVmZmVyLmN1cnJlbnRXcml0ZU9mZnNldCgpO1xuICAgICAgICAgICAgRGVsZXRlRW50aXR5LndyaXRlKGVudGl0eUlkLCBidWZmZXIpO1xuICAgICAgICAgICAgY3JkdE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgIHR5cGU6IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfRU5USVRZLFxuICAgICAgICAgICAgICAgIGVudGl0eUlkLFxuICAgICAgICAgICAgICAgIG1lc3NhZ2VCdWZmZXI6IGJ1ZmZlci5idW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lIG9mIGNyZHRNZXNzYWdlcykge1xuICAgICAgICAgICAgICAgIC8vIEF2b2lkIGVjaG8gbWVzc2FnZXNcbiAgICAgICAgICAgICAgICBpZiAobWVzc2FnZS50cmFuc3BvcnRJZCA9PT0gdHJhbnNwb3J0SW5kZXgpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIC8vIFJlZHVuZGFudCBtZXNzYWdlIGZvciB0aGUgdHJhbnNwb3J0XG4gICAgICAgICAgICAgICAgaWYgKCF0cmFuc3BvcnQuZmlsdGVyKG1lc3NhZ2UpKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCB7IGVudGl0eUlkIH0gPSBmaW5kTmV0d29ya0lkKG1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zZm9ybU5lZWRzRml4ID0gJ2NvbXBvbmVudElkJyBpbiBtZXNzYWdlICYmXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29tcG9uZW50SWQgPT09IFRyYW5zZm9ybS5jb21wb25lbnRJZCAmJlxuICAgICAgICAgICAgICAgICAgICBUcmFuc2Zvcm0uaGFzKGVudGl0eUlkKSAmJlxuICAgICAgICAgICAgICAgICAgICBOZXR3b3JrUGFyZW50LmhhcyhlbnRpdHlJZCkgJiZcbiAgICAgICAgICAgICAgICAgICAgTmV0d29ya0VudGl0eS5oYXMoZW50aXR5SWQpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZXJlIHdhcyBhIExPQ0FMIGNoYW5nZSBpbiB0aGUgdHJhbnNmb3JtLiBBZGQgdGhlIHBhcmVudCB0byB0aGF0IHRyYW5zZm9ybVxuICAgICAgICAgICAgICAgIGlmIChpc1JlbmRlcmVyVHJhbnNwb3J0ICYmIG1lc3NhZ2UudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLlBVVF9DT01QT05FTlQgJiYgdHJhbnNmb3JtTm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mVyKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiB3cml0ZUJ1ZmZlci50b0JpbmFyeSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudGl0eUlkOiBlbnRpdHksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiB0aW1lc3RhbXBzLmdldChlbnRpdHkpXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogdGltZXN0YW1wcy5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gW251bGwsIGRhdGEuZ2V0KGVudGl0eSldO1xuICAgIH07XG59XG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlR2V0Q3JkdE1lc3NhZ2VzRm9yTHd3KGNvbXBvbmVudElkLCB0aW1lc3RhbXBzLCBkaXJ0eUl0ZXJhdG9yLCBzY2hlbWEsIGRhdGEpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24qICgpIHtcbiAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VGltZXN0YW1wID0gaW5jcmVtZW50VGltZXN0YW1wKGVudGl0eSwgdGltZXN0YW1wcyk7XG4gICAgICAgICAgICBpZiAoZGF0YS5oYXMoZW50aXR5KSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHdyaXRlQnVmZmVyID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgICAgICBzY2hlbWEuc2VyaWFsaXplKGRhdGEuZ2V0KGVudGl0eSksIHdyaXRlQnVmZmVyKTtcbiAgICAgICAgICAgICAgICBjb25zdCBtc2cgPSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5ULFxuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgZW50aXR5SWQ6IGVudGl0eSxcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogd3JpdGVCdWZmZXIudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiBuZXdUaW1lc3RhbXBcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHlpZWxkIG1zZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IG1zZyA9IHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlQsXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudElkLFxuICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICB0aW1lc3RhbXA6IG5ld1RpbWVzdGFtcFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgeWllbGQgbXNnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGRpcnR5SXRlcmF0b3IuY2xlYXIoKTtcbiAgICB9O1xufVxuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGNyZWF0ZUNvbXBvbmVudERlZmluaXRpb25Gcm9tU2NoZW1hKGNvbXBvbmVudE5hbWUsIGNvbXBvbmVudElkLCBzY2hlbWEpIHtcbiAgICBjb25zdCBkYXRhID0gbmV3IE1hcCgpO1xuICAgIGNvbnN0IGRpcnR5SXRlcmF0b3IgPSBuZXcgU2V0KCk7XG4gICAgY29uc3QgdGltZXN0YW1wcyA9IG5ldyBNYXAoKTtcbiAgICByZXR1cm4ge1xuICAgICAgICBnZXQgY29tcG9uZW50SWQoKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50SWQ7XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBjb21wb25lbnROYW1lKCkge1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudE5hbWU7XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBjb21wb25lbnRUeXBlKCkge1xuICAgICAgICAgICAgLy8gYSBnZXR0ZXIgaXMgdXNlZCBoZXJlIHRvIHByZXZlbnQgYWNjaWRlbnRhbCBjaGFuZ2VzXG4gICAgICAgICAgICByZXR1cm4gMCAvKiBDb21wb25lbnRUeXBlLkxhc3RXcml0ZVdpbkVsZW1lbnRTZXQgKi87XG4gICAgICAgIH0sXG4gICAgICAgIHNjaGVtYSxcbiAgICAgICAgaGFzKGVudGl0eSkge1xuICAgICAgICAgICAgcmV0dXJuIGRhdGEuaGFzKGVudGl0eSk7XG4gICAgICAgIH0sXG4gICAgICAgIGRlbGV0ZUZyb20oZW50aXR5LCBtYXJrQXNEaXJ0eSA9IHRydWUpIHtcbiAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudCA9IGRhdGEuZ2V0KGVudGl0eSk7XG4gICAgICAgICAgICBpZiAoZGF0YS5kZWxldGUoZW50aXR5KSAmJiBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50IHx8IG51bGw7XG4gICAgICAgIH0sXG4gICAgICAgIGVudGl0eURlbGV0ZWQoZW50aXR5LCBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgaWYgKGRhdGEuZGVsZXRlKGVudGl0eSkgJiYgbWFya0FzRGlydHkpIHtcbiAgICAgICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRPck51bGwoZW50aXR5KSB7XG4gICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBkYXRhLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudCA/IGRlZXBSZWFkb25seShjb21wb25lbnQpIDogbnVsbDtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0KGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbZ2V0RnJvbV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yIGVudGl0eSAjJHtlbnRpdHl9IG5vdCBmb3VuZGApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGRlZXBSZWFkb25seShjb21wb25lbnQpO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmIChjb21wb25lbnQpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFtjcmVhdGVdIENvbXBvbmVudCAke2NvbXBvbmVudE5hbWV9IGZvciAke2VudGl0eX0gYWxyZWFkeSBleGlzdHNgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IHVzZWRWYWx1ZSA9IHZhbHVlID09PSB1bmRlZmluZWQgPyBzY2hlbWEuY3JlYXRlKCkgOiBzY2hlbWEuZXh0ZW5kID8gc2NoZW1hLmV4dGVuZCh2YWx1ZSkgOiB2YWx1ZTtcbiAgICAgICAgICAgIGRhdGEuc2V0KGVudGl0eSwgdXNlZFZhbHVlKTtcbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICByZXR1cm4gdXNlZFZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgdXNlZFZhbHVlID0gdmFsdWUgPT09IHVuZGVmaW5lZCA/IHNjaGVtYS5jcmVhdGUoKSA6IHNjaGVtYS5leHRlbmQgPyBzY2hlbWEuZXh0ZW5kKHZhbHVlKSA6IHZhbHVlO1xuICAgICAgICAgICAgZGF0YS5zZXQoZW50aXR5LCB1c2VkVmFsdWUpO1xuICAgICAgICAgICAgZGlydHlJdGVyYXRvci5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgIHJldHVybiB1c2VkVmFsdWU7XG4gICAgICAgIH0sXG4gICAgICAgIGdldE11dGFibGVPck51bGwoZW50aXR5KSB7XG4gICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBkYXRhLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgaWYgKCFjb21wb25lbnQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICB9LFxuICAgICAgICBnZXRPckNyZWF0ZU11dGFibGUoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3JlYXRlKGVudGl0eSwgdmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZGlydHlJdGVyYXRvci5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRNdXRhYmxlKGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gdGhpcy5nZXRNdXRhYmxlT3JOdWxsKGVudGl0eSk7XG4gICAgICAgICAgICBpZiAoY29tcG9uZW50ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbbXV0YWJsZV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yICR7ZW50aXR5fSBub3QgZm91bmRgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBjb21wb25lbnQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29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Db21wb25lbnREZWZpbml0aW9uRnJvbVNjaGVtYShjb21wb25lbnROYW1lLCBjb21wb25lbnRJZCwgc2NoZW1hLCBvcHRpb25zKSB7XG4gICAgY29uc3QgZGF0YSA9IG5ldyBNYXAoKTtcbiAgICBjb25zdCBkaXJ0eUl0ZXJhdG9yID0gbmV3IFNldCgpO1xuICAgIGNvbnN0IHF1ZXVlZENvbW1hbmRzID0gW107XG4gICAgLy8gb25seSBzb3J0IHRoZSBhcnJheSBpZiB0aGUgbGF0ZXN0IChOKSBlbGVtZW50IGhhcyBhIHRpbWVzdGFtcCA8PSBOLTFcbiAgICBmdW5jdGlvbiBzaG91bGRTb3J0KHJvdykge1xuICAgICAgICBjb25zdCBsZW4gPSByb3cucmF3Lmxlbmd0aDtcbiAgICAgICAgaWYgKGxlbiA+IDEgJiYgcm93LnJhd1tsZW4gLSAxXS50aW1lc3RhbXAgPD0gcm93LnJhd1tsZW4gLSAyXS50aW1lc3RhbXApIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ290VXBkYXRlZChlbnRpdHkpIHtcbiAgICAgICAgY29uc3Qgcm93ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgaWYgKHJvdykge1xuICAgICAgICAgICAgaWYgKHNob3VsZFNvcnQocm93KSkge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc29ydChzb3J0QnlUaW1lc3RhbXApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgd2hpbGUgKHJvdy5yYXcubGVuZ3RoID4gb3B0aW9ucy5tYXhFbGVtZW50cykge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc2hpZnQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGZyb3plblNldCA9IGZyZWV6ZVNldCh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gICByZXR1cm4geyBzZXQ6IGdvdFVwZGF0ZWQoZW50aXR5KSwgdmFsdWU6IHVzZWRWYWx1ZSB9O1xuICAgIH1cbiAgICBjb25zdCByZXQgPSB7XG4gICAgICAgIGdldCBjb21wb25lbnRJZCgpIHtcbiAgICAgICAgICAgIHJldHVybiBjb21wb25lbnRJZDtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0IGNvbXBvbmVudE5hbWUoKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50TmFtZTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0IGNvbXBvbmVudFR5cGUoKSB7XG4gICAgICAgICAgICAvLyBhIGdldHRlciBpcyB1c2VkIGhlcmUgdG8gcHJldmVudCBhY2NpZGVudGFsIGNoYW5nZXNcbiAgICAgICAgICAgIHJldHVybiAxIC8qIENvbXBvbmVudFR5cGUuR3Jvd09ubHlWYWx1ZVNldCAqLztcbiAgICAgICAgfSxcbiAgICAgICAgc2NoZW1hLFxuICAgICAgICBoYXMoZW50aXR5KSB7XG4gICAgICAgICAgICByZXR1cm4gZGF0YS5oYXMoZW50aXR5KTtcbiAgICAgICAgfSxcbiAgICAgICAgZW50aXR5RGVsZXRlZChlbnRpdHkpIHtcbiAgICAgICAgICAgIGRhdGEuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgIH0sXG4gICAgICAgIGdldChlbnRpdHkpIHtcbiAgICAgICAgICAgIGNvbnN0IHZhbHVlcyA9IGRhdGEuZ2V0KGVudGl0eSk7XG4gICAgICAgICAgICBpZiAodmFsdWVzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlcy5mcm96ZW5TZXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW1wdHlSZWFkb25seVNldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgYWRkVmFsdWUoZW50aXR5LCByYXdWYWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgeyBzZXQsIHZhbHVlIH0gPSBhcHBlbmQoZW50aXR5LCByYXdWYWx1ZSk7XG4gICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgIHNjaGVtYS5zZXJpYWxpemUodmFsdWUsIGJ1Zik7XG4gICAgICAgICAgICBxdWV1ZWRDb21tYW5kcy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICBkYXRhOiBidWYudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogMCxcbiAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuQVBQRU5EX1ZBTFVFXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBzZXQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29tcG9uZW50XSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgW2VudGl0eSwgY29tcG9uZW50LmZyb3plblNldF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgICpkaXJ0eUl0ZXJhdG9yKCkge1xuICAgICAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgICAgIHlpZWxkIGVudGl0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q3JkdFVwZGF0ZXMoKSB7XG4gICAgICAgICAgICAvLyByZXR1cm4gYSBjb3B5IG9mIHRoZSBjb21tYW5kcywgYW5kIHRoZW4gY2xlYXIgdGh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GVmYXVsdFxuICAgICAgICAgICAgY29uc3QgYXJyYXlDb21tYW5kcyA9IEFycmF5LmZyb20oY29tbWFuZHMpO1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IGFycmF5Q29tbWFuZHMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgICAgICAgICBjb25zdCBjb21tYW5kID0gYXJyYXlDb21tYW5kc1tpXTtcbiAgICAgICAgICAgICAgICBpZiAoY29tbWFuZC50aW1lc3RhbXAgPiBtYXhUaW1lc3RhbXApIHtcbiAgICAgICAgICAgICAgICAgICAgbWF4VGltZXN0YW1wID0gY29tbWFuZC50aW1lc3RhbXA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjb21tYW5kLnRpbWVzdGFtcCA+IGdsb2JhbFN0YXRlLnByZXZpb3VzRnJhbWVNYXhUaW1lc3RhbXApIHtcbiAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUudGhpc0ZyYW1lQ29tbWFuZHMucHVzaChjb21tYW5kKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8gfHwgY29tbWFuZC5zdGF0ZSA9PT0gMSAvKiBQb2ludGVyRXZlbnRUeXBlLlBFVF9ET1dOICovKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZXZDb21tYW5kID0gZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuZ2V0KGNvbW1hbmQuYnV0dG9uKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFwcmV2Q29tbWFuZCB8fCBjb21tYW5kLnRpbWVzdGFtcCA+IHByZXZDb21tYW5kLnRpbWVzdGFtcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuc2V0KGNvbW1hbmQuYnV0d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AoaW5wdXRBY3Rpb24gIT09IDMgLyogSW5wdXRBY3Rpb24uSUFfQU5ZICovKSB7XG4gICAgICAgICAgICByZXR1cm4gZmluZENsaWNrKGlucHV0QWN0aW9uLCBlbnRpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3QgaW5wdXQgb2YgSW5wdXRDb21tYW5kcykge1xuICAgICAgICAgICAgY29uc3QgY21kID0gZmluZENsaWNrKGlucHV0LCBlbnRpdHkpO1xuICAgICAgICAgICAgaWYgKGNtZClcbiAgICAgICAgICAgICAgICByZXR1cm4gY21kO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgICBmdW5jdGlvbiBmaW5kQ2xpY2soaW5wdXRBY3Rpb24sIGVudGl0eSkge1xuICAgICAgICBsZXQgZG93biA9IG51bGw7XG4gICAgICAgIGxldCB1cCA9IG51bGw7XG4gICAgICAgIC8vIFdlIHNlYXJjaCB0aGUgbGFzdCBVUCAmIERPV04gY29tbWFuZCBzb3J0ZWQgYnkgdGltZXN0YW1wIGRlc2NlbmRpbmdcbiAgICAgICAgZm9yIChjb25zdCBpdCBvZiBmaW5kQ29tbWFuZHNCeUFjdGlvbkRlc2NlbmRpbmcoaW5wdXRBY3Rpb24sIGVudGl0eSkpIHtcbiAgICAgICAgICAgIGlmICghdXApIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgdXAgPSBpdDtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoIWRvd24pIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDEgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfRE9XTiAqLykge1xuICAgICAgICAgICAgICAgICAgICBkb3duID0gaXQ7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoIXVwIHx8ICFkb3duKVxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIC8vIElmIHRoZSBET1dOIGNvbW1hbmQgaGFzIGhhcHBlbiBiZWZvcmUgdGhlIFVQIGNvbW1hbmRzLCBpdCBtZWFucyB0aGF0IHRoYXQgYSBjbGlja2VkIGhhcyBoYXBwZW5cbiAgICAgICAgaWYgKGRvd24udGltZXN0YW1wIDwgdXAudGltZXN0YW1wICYmIHRpbWVzdGFtcElzQ3VycmVudEZyYW1lKHVwLnRpbWVzdGFtcCkpIHtcbiAgICAgICAgICAgIHJldHVybiB7IHVwLCBkb3duIH07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdldElucHV0Q29tbWFuZEZyb21FbnRpdHkoaW5wdXRBY3Rpb24sIHBvaW50ZXJFdmVudFR5cGUsIGVudGl0eSkge1xuICAgICAgICBpZiAoaW5wdXRBY3Rpb24gIT09IDMgLyogSW5wdXRBY3Rpb24uSUFfQU5ZICovKSB7XG4gICAgICAgICAgICByZXR1cm4gZmluZElucHV0Q29tbWFuZChpbnB1dEFjdGlvbiwgcG9pbnRlckV2ZW50VHlwZSwgZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKGNvbnN0IGlucHV0IG9mIElucHV0Q29tbWFuZHMpIHtcbiAgICAgICAgICAgIGNvbnN0IGNtZCA9IGZpbmRJbnB1dENvbW1hbmQoaW5wdXQsIHBvaW50ZXJFdmVudFR5cGUsIGVudGl0eSk7XG4gICAgICAgICAgICBpZiAoY21kKVxuICAgICAgICAgICAgICAgIHJldHVybiBjbWQ7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdldElucHV0Q29tbWFuZChpbnB1dEFjdGlvbiwgcG9pbnRlckV2ZW50VHlwZSwgZW50aXR5KSB7XG4gICAgICAgIGlmIChlbnRpdHkpIHtcbiAgICAgICAgICAgIHJldHVybiBnZXRJbnB1dENvbW1hbmRGcm9tRW50aXR5KGlucHV0QWN0aW9uLCBwb2ludGVyRXZlbnRUeXBlLCBlbnRpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZm9yIChjb25zdCBjb21tYW5kIG9mIGdsb2JhbFN0YXRlLnRoaXNGcmFtZUNvbW1hbmRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKChjb21tYW5kLmJ1dHRvbiA9PT0gaW5wdXRBY3Rpb24gfHwgaW5wdXRBY3Rpb24gPT09IDMgLyogSW5wdXRBY3Rpb24uSUFfQU5ZICovKSAmJlxuICAgICAgICAgICAgICAgICAgICBjb21tYW5kLnN0YXRlID09PSBwb2ludGVyRXZlbnRUeXBlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjb21tYW5kO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIGZpbmRJbnB1dENvbW1hbmQoaW5wdXRBY3Rpb24sIHBvaW50ZXJFdmVudFR5cGUsIGVudGl0eSkge1xuICAgICAgICAvLyBXZSBzZWFyY2ggdGhlIGxhc3QgcG9pbnRlciBFdmVudCBjb21tYW5kIHNvcnRlZCBieSB0aW1lc3RhbXBcbiAgICAgICAgY29uc3QgY29tbWFuZCA9IGZpbmRMYXN0QWN0aW9uKHBvaW50ZXJFdmVudFR5cGUsIGlucHV0QWN0aW9uLCBlbnRpdHkpO1xuICAgICAgICBpZiAoIWNvbW1hbmQpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgaWYgKHRpbWVzdGFtcElzQ3Vyc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WUpO1xuICAgICAgICBjb25zdCBwcmV2ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKHByZXYpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50IG51bWJlciAke2NvbXBvbmVudElkfSB3YXMgYWxyZWFkeSByZWdpc3RlcmVkLmApO1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChjb21wb25lbnQuY29tcG9uZW50TmFtZSAhPT0gY29tcG9uZW50TmFtZSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBDb21wb25lbnQgbmFtZSBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50TmFtZSAke2NvbXBvbmVudE5hbWV9ICE9ICR7Y29tcG9uZW50LmNvbXBvbmVudE5hbWV9YCk7XG4gICAgICAgIH1cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgKGNvbXBvbmVudC5jb21wb25lbnRJZCAhPT0gY29tcG9uZW50SWQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50IG51bWJlciBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50SWQgJHtjb21wb25lbnRJZH0gIT0gJHtjb21wb25lbnQuY29tcG9uZW50SWR9YCk7XG4gICAgICAgIH1cbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBjb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hKGNvbXBvbmVudE5hbWUsIHNjaGVtYSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudE5hbWUpO1xuICAgICAgICBjb25zdCBwcmV2ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKHByZXYpIHtcbiAgICAgICAgICAgIC8vIFRPRE86IGFzc2VydCBzcGVjID09PSBwcmV2LnNwZWNcbiAgICAgICAgICAgIHJldHVybiBwcmV2O1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChzZWFsZWQpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0VuZ2luZSBpcyBhbHJlYWR5IHNlYWxlZC4gTm8gY29tcG9uZW50cyBjYW4gYmUgYWRkZWQgYXQgdGhpcyBzdGFnZScpO1xuICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSBjcmVhdGVDb21wb25lbnREZWZpbml0aW9uRnJvbVNjaGVtYShjb21wb25lbnROYW1lLCBjb21wb25lbnRJZCwgc2NoZW1hKTtcbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBuZXdDb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gbmV3Q29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEoY29tcG9uZW50TmFtZSwgc2NoZW1hLCBvcHRpb25zKSB7XG4gICAgICAgIGNvbnN0IGNvbXBvbmVudElkID0gY29tcG9uZW50TnVtYmVyRnJvbU5hbWUoY29tcG9uZW50TmFtZSk7XG4gICAgICAgIGNvbnN0IHByZXYgPSBjb21wb25lbnRzRGVmaW5pdGlvbi5nZXQoY29tcG9uZW50SWQpO1xuICAgICAgICBpZiAocHJldikge1xuICAgICAgICAgICAgLy8gVE9ETzogYXNzZXJ0IHNwZWMgPT09IHByZXYuc3BlY1xuICAgICAg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gICAgICBjb25zdCBzY2hlbWFTcGVjID0gU2NoZW1hcy5NYXAobWFwU3BlYywgY29uc3RydWN0b3JEZWZhdWx0KTtcbiAgICAgICAgY29uc3QgZGVmID0gY3JlYXRlQ29tcG9uZW50RGVmaW5pdGlvbkZyb21TY2hlbWEoY29tcG9uZW50TmFtZSwgY29tcG9uZW50SWQsIHNjaGVtYVNwZWMpO1xuICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSB7XG4gICAgICAgICAgICAuLi5kZWYsXG4gICAgICAgICAgICBjcmVhdGUoZW50aXR5LCB2YWwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVmLmNyZWF0ZShlbnRpdHksIHZhbCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgdmFsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlZi5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBjb21wb25lbnRzRGVmaW5pdGlvbi5zZXQoY29tcG9uZW50SWQsIG5ld0NvbXBvbmVudCk7XG4gICAgICAgIHJldHVybiBuZXdDb21wb25lbnQ7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdldENvbXBvbmVudChjb21wb25lbnRJZE9yTmFtZSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IHR5cGVvZiBjb21wb25lbnRJZE9yTmFtZSA9PT0gJ251bWJlcicgPyBjb21wb25lbnRJZE9yTmFtZSA6IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudElkT3JOYW1lKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKCFjb21wb25lbnQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50IC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b2YgZ2V0RW50aXRpZXNXaXRoKExhYmVsQ29tcG9uZW50KSkge1xuICAgICAgICAgICAgaWYgKG5hbWUudmFsdWUgPT09IHZhbHVlKVxuICAgICAgICAgICAgICAgIHJldHVybiBlbnRpdHk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGZ1bmN0aW9uKiBnZXRDb21wb25lbnREZWZHcm91cCguLi5hcmdzKSB7XG4gICAgICAgIGNvbnN0IFtmaXJzdENvbXBvbmVudERlZiwgLi4uY29tcG9uZW50RGVmaW5pdGlvbnNdID0gYXJncztcbiAgICAgICAgZm9yIChjb25zdCBbZW50aXR5XSBvZiBmaXJzdENvbXBvbmVudERlZi5pdGVyYXRvcigpKSB7XG4gICAgICAgICAgICBsZXQgbWF0Y2hlcyA9IHRydWU7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGNvbXBvbmVudERlZiBvZiBjb21wb25lbnREZWZpbml0aW9ucykge1xuICAgICAgICAgICAgICAgIGlmICghY29tcG9uZW50RGVmLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoZXMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1hdGNoZXMpIHtcbiAgICAgICAgICAgICAgICB5aWVsZCBbZW50aXR5LCAuLi5hcmdzXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBnZXRTeXN0ZW1zKCkge1xuICAgICAgICByZXR1cm4gc3lzdGVtcy5nZXRTeXN0ZW1zKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGNvbXBvbmVudHNJdGVyKCkge1xuICAgICAgICByZXR1cm4gY29tcG9uZW50c0RlZmluaXRpb24udmFsdWVzKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZUNvbXBvbmVudERlZmluaXRpb24oY29tcG9uZW50SWRPck5hbWUpIHtcbiAgICAgICAgaWYgKHNlYWxlZClcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRW5naW5lIGlzIGFscmVhZHkgc2VhbGVkLiBObyBjb21wb25lbnRzIGNhbiBiZSByZW1vdmVkIGF0IHRoaXMgc3RhZ2UnKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50SWQgPSB0eXBlb2YgY29tcG9uZW50SWRPck5hbWUgPT09ICdudW1iZXInID8gY29tcG9uZW50SWRPck5hbWUgOiBjb21wb25lbnROdW1iZXJGcm9tTmFtZShjb21wb25lbnRJZE9yTmFtZSk7XG4gICAgICAgIGNvbXBvbmVudHNEZWZpbml0aW9uLmRlbGV0ZShjb21wb25lbnRJZCk7XG4gICAgfVxuICAgIGNvbXBvbmVudHMuVHJhbnNmb3JtKHsgZGVmaW5lQ29tcG9uZW50RnJvbVNjaGVtYSB9KTtcbiAgICBmdW5jdGlvbiBzZWFsKCkge1xuICAgICAgICBpZiAoIXNlYWxlZCkge1xuICAgICAgICAgICAgc2VhbGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICBhZGRFbnRpdHksXG4gICAgICAgIHJlbW92ZUVudGl0eSxcbiAgICAgICAgcmVtb3ZlRW50aXR5V2l0aENoaWxkcmVuLFxuICAgICAgICBhZGRTeXN0ZW0sXG4gICAgICAgIGdldFN5c3RlbXMsXG4gICAgICAgIHJlbW92ZVN5c3RlbSxcbiAgICAgICAgZGVmaW5lQ29tcG9uZW50LFxuICAgICAgICBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hLFxuICAgICAgICBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEsXG4gICAgICAgIGdldEVudGl0aWVzV2l0aCxcbiAgICAgICAgZ2V0Q29tcG9uZW50LFxuICAgICAgICBnZXRDb21wb25lbnRPck51bGw6IGdldENvbXBvbm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bnRpdHkpO1xuICAgICAgICAgICAgcG9pbnRlckV2ZW50LnBvaW50ZXJFdmVudHMucHVzaCh7XG4gICAgICAgICAgICAgICAgZXZlbnRUeXBlOiB0eXBlLFxuICAgICAgICAgICAgICAgIGV2ZW50SW5mbzoge1xuICAgICAgICAgICAgICAgICAgICBidXR0b246IG9wdHMuYnV0dG9uLFxuICAgICAgICAgICAgICAgICAgICBzaG93RmVlZGJhY2s6IG9wdHMuc2hvd0ZlZWRiYWNrLFxuICAgICAgICAgICAgICAgICAgICBob3ZlclRleHQ6IG9wdHMuaG92ZXJUZXh0LFxuICAgICAgICAgICAgICAgICAgICBtYXhEaXN0YW5jZTogb3B0cy5tYXhEaXN0YW5jZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZVBvaW50ZXJFdmVudChlbnRpdHksIHR5cGUsIGJ1dHRvbikge1xuICAgICAgICBjb25zdCBwb2ludGVyRXZlbnQgPSBQb2ludGVyRXZlbnRzLmdldE11dGFibGVPck51bGwoZW50aXR5KTtcbiAgICAgICAgaWYgKCFwb2ludGVyRXZlbnQpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIHBvaW50ZXJFdmVudC5wb2ludGVyRXZlbnRzID0gcG9pbnRlckV2ZW50LnBvaW50ZXJFdmVudHMuZmlsdGVyKChwb2ludGVyKSA9PiAhKHBvaW50ZXIuZXZlbnRJbmZvPy5idXR0b24gPT09IGJ1dHRvbiAmJiBwb2ludGVyLmV2ZW50VHlwZSA9PT0gdHlwZSkpO1xuICAgIH1cbiAgICBmdW5jdGlvbiBnZXRQb2ludGVyRXZlbnQoZXZlbnRUeXBlKSB7XG4gICAgICAgIGlmIChldmVudFR5cGUgPT09IEV2ZW50VHlwZS5VcCkge1xuICAgICAgICAgICAgcmV0dXJuIDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi87XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIDEgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfRE9XTiAqLztcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlRXZlbnQoZW50aXR5LCB0eXBlKSB7XG4gICAgICAgIGNvbnN0IGV2ZW50ID0gZ2V0RXZlbnQoZW50aXR5KTtcbiAgICAgICAgY29uc3QgcG9pbnRlckV2ZW50ID0gZXZlbnQuZ2V0KHR5cGUpO1xuICAgICAgICBpZiAocG9pbnRlckV2ZW50Py5vcHRzLmhvdmVyVGV4dCkge1xuICAgICAgICAgICAgcmVtb3ZlUG9pbnRlckV2ZW50KGVudGl0eSwgZ2V0UG9pbnRlckV2ZW50KHR5cGUpLCBwb2ludGVyRXZlbnQub3B0cy5idXR0b24pO1xuICAgICAgICB9XG4gICAgICAgIGV2ZW50LmRlbGV0ZSh0eXBlKTtcbiAgICB9XG4gICAgLy8gQGludGVybmFsXG4gICAgZW5naW5lLmFkZFN5c3RlbShmdW5jdGlvbiBFdmVudFN5c3RlbSgpIHtcbiAgICAgICAgZm9yIChjb25zdCBbZW50aXR5LCBldmVudF0gb2YgZXZlbnRzTWFwKSB7XG4gICAgICAgICAgICBpZiAoZW5naW5lLmdldEVudGl0eVN0YXRlKGVudGl0eSkgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpIHtcbiAgICAgICAgICAgICAgICBldmVudHNNYXAuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKGNvbnN0IFtldmVudFR5cGUsIHsgY2IsIG9wdHMgfV0gb2YgZXZlbnQpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuQ2xpY2spIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29tbWFuZCA9IGlucHV0U3lzdGVtLmdldENsaWNrKG9wdHMuYnV0dG9uLCBlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWFuZClcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZC51cCksICdDbGljayBldmVudCByZXR1cm5lZCBhIHRoZW5hYmxlLiBPbmx5IHN5bmNocm9ub3VzIGZ1bmN0aW9ucyBhcmUgYWxsb3dlZCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuRG93biB8fCBldmVudFR5cGUgPT09IEV2ZW50VHlwZS5VcCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21tYW5kID0gaW5wdXRTeXN0ZW0uZ2V0SW5wdXRDb21tYW5kKG9wdHMuYnV0dG9uLCBnZXRQb2ludGVyRXZlbnQoZXZlbnRUeXBlKSwgZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZCksICdFdmVudCBoYW5kbGVyIHJldHVybmVkIGEgdGhlbmFibGUuIE9ubHkgc3luY2hyb25vdXMgZnVuY3Rpb25zIGFyZSBhbGxvd2VkJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBjb25zdCBvblBvaW50ZXJEb3duID0gKC4uLmFyZ3MpID0+IHtcbiAgICAgICAgY29uc3QgW2RhdGEsIGNiLCBtYXliZU9wdHNdID0gYXJncztcbiAgICAgICAgaWYgKHR5cGVvZiBkYXRhID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgcmV0dXJuIG9uUG9pbnRlckRvd24oeyBlbnRpdHk6IGRhdGEsIG9wdHM6IG1heWJlT3B0cyA/PyB7fSB9LCBjYik7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgeyBl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dGFydFR3ZWVucyA9IFtdO1xuICAgIC8vIExvZ2ljIGZvciBzZXF1ZW5jZSB0d2VlbnNcbiAgICBlbmdpbmUuYWRkU3lzdGVtKCgpID0+IHtcbiAgICAgICAgZm9yIChjb25zdCByZXN0YXJ0IG9mIHJlc3RhcnRUd2VlbnMpIHtcbiAgICAgICAgICAgIHJlc3RhcnQoKTtcbiAgICAgICAgfVxuICAgICAgICByZXN0YXJ0VHdlZW5zLmxlbmd0aCA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgdHdlZW5dIG9mIGVuZ2luZS5nZXRFbnRpdGllc1dpdGgoVHdlZW4pKSB7XG4gICAgICAgICAgICBpZiAodHdlZW5DaGFuZ2VkKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgUmVhZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgIFR3ZWVuLnNjaGVtYS5zZXJpYWxpemUodHdlZW4sIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgY2FjaGUuc2V0KGVudGl0eSwge1xuICAgICAgICAgICAgICAgICAgICB0d2VlbjogYnVmZmVyLnRvQmluYXJ5KCksXG4gICAgICAgICAgICAgICAgICAgIGZyYW1lczogMCxcbiAgICAgICAgICAgICAgICAgICAgY29tcGxldGVkOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgY2hhbmdlZDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgdHdlZW5DYWNoZSA9IGNhY2hlLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgdHdlZW5DYWNoZS5mcmFtZXMgKz0gMTtcbiAgICAgICAgICAgIHR3ZWVuQ2FjaGUuY2hhbmdlZCA9IGZhbHNlO1xuICAgICAgICAgICAgaWYgKGlzQ29tcGxldGVkKGVudGl0eSkpIH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ICAgICAgICAgICAgICAgIG11dGFibGVUd2VlbkhlbHBlci5zZXF1ZW5jZS5wdXNoKHR3ZWVuKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh0d2VlblNlcXVlbmNlLmxvb3AgPT09IDEgLyogVHdlZW5Mb29wLlRMX1lPWU8gKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgVHdlZW4uY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgYmFja3dhcmRzVHdlZW4odHdlZW4pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodHdlZW5TZXF1ZW5jZS5sb29wID09PSAwIC8qIFR3ZWVuTG9vcC5UTF9SRVNUQVJUICovKSB7XG4gICAgICAgICAgICAgICAgICAgIFR3ZWVuLmRlbGV0ZUZyb20oZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgY2FjaGUuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RhcnRUd2VlbnMucHVzaCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBUd2Vlbi5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB0d2Vlbik7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0sIE51bWJlci5ORUdBVElWRV9JTkZJTklUWSk7XG4gICAgZnVuY3Rpb24gYmFja3dhcmRzVHdlZW4odHdlZW4pIHtcbiAgICAgICAgaWYgKHR3ZWVuLm1vZGU/LiRjYXNlID09PSAnbW92ZScgJiYgdHdlZW4ubW9kZS5tb3ZlKSB7XG4gICAgICAgICAgICByZXR1cm4geyAuLi50d2VlbiwgbW9kZTogeyAuLi50d2Vlbi5tb2RlLCBtb3ZlOiB7IHN0YXJ0OiB0d2Vlbi5tb2RlLm1vdmUuZW5kLC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Z21lbnRMZW5ndGggIT09IDIgfHxcbiAgICAgICAgICAgICAgICAgICAgcmVzLmNoYXJDb2RlQXQocmVzLmxlbmd0aCAtIDEpICE9PSA0NiAvKi4qLyB8fFxuICAgICAgICAgICAgICAgICAgICByZXMuY2hhckNvZGVBdChyZXMubGVuZ3RoIC0gMikgIT09IDQ2IC8qLiovKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXMubGVuZ3RoID4gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGFzdFNsYXNoSW5kZXggPSByZXMubGFzdEluZGV4T2YoJy8nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYXN0U2xhc2hJbmRleCAhPT0gcmVzLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGFzdFNsYXNoSW5kZXggPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMgPSByZXMuc2xpY2UoMCwgbGFzdFNsYXNoSW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IHJlcy5sZW5ndGggLSAxIC0gcmVzLmxhc3RJbmRleE9mKCcvJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG90cyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVzLmxlbmd0aCA9PT0gMiB8fCByZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb3RzID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChhbGxvd0Fib3ZlUm9vdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgKz0gJy8uLic7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcuLic7XG4gICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgIHJlcyArPSAnLycgKyBwYXRoLnNsaWNlKGxhc3RTbGFzaCArIDEsIGkpO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmVzID0gcGF0aC5zbGljZShsYXN0U2xhc2ggKyAxLCBpKTtcbiAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IGkgLSBsYXN0U2xhc2ggLSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGFzdFNsYXNoID0gaTtcbiAgICAgICAgICAgIGRvdHMgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGNvZGUgPT09IDQ2IC8qLiovICYmIGRvdHMgIT09IC0xKSB7XG4gICAgICAgICAgICArK2RvdHM7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBkb3RzID0gLTE7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHJlcztcbn1cbi8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG5leHBvcnQgZnVuY3Rpb24gcmVzb2x2ZSguLi5hcmdzKSB7XG4gICAgbGV0IHJlc29sdmVkUGF0aCA9ICcnO1xuICAgIGxldCByZXNvbHZlZEFic29sdXRlID0gZmFsc2U7XG4gICAgbGV0IGN3ZDtcbiAgICBmb3IgKGxldCBpID0gYXJncy5sZW5ndGggLSAxOyBpID49IC0xICYmICFyZXNvbHZlZEFic29sdXRlOyBpLS0pIHtcbiAgICAgICAgbGV0IHBhdGg7XG4gICAgICAgIGlmIChpID49IDApXG4gICAgICAgICAgICBwYXRoID0gYXJnc1tpXTtcbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBpZiAoY3dkID09PSB1bmRlZmluZWQpXG4gICAgICAgICAgICAgICAgY3dkID0gY3VycmVudFdvcmtpbmdEaXI7XG4gICAgICAgICAgICBwYXRoID0gY3dkO1xuICAgICAgICB9XG4gICAgICAgIC8vIFNraXAgZW1wdHkgZW50cmllc1xuICAgICAgICBpZiAocGF0aC5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIHJlc29sdmVkUGF0aCA9IHBhdGggKyAnLycgKyByZXNvbHZlZFBhdGg7XG4gICAgICAgIHJlc29sdmVkQWJzb2x1dGUgPSBwYXRoLmNoYXJDb2RlQXQoMCkgPT09IDQ3OyAvKi8qL1xuICAgIH1cbiAgICAvLyBBdCB0aGlzIHBvaW50IHRoZSBwYXRoIHNob3VsZCBiZSByZXNvbHZ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mZmVyKGNvbXBvbmVudC5kYXRhPy5iaW5hcnkpKTtcbiAgICB9XG59XG4vKipcbiAqIFJldHVybiB0aGUgY29tcG9uZW50IGRlZmluaXRpb24gZnJvbSBjb21wb3NpdGUgaW5mb1xuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRDb21wb25lbnREZWZpbml0aW9uKGVuZ2luZSwgY29tcG9uZW50KSB7XG4gICAgY29uc3QgZXhpc3RpbmdDb21wb25lbnREZWZpbml0aW9uID0gZW5naW5lLmdldENvbXBvbmVudE9yTnVsbChjb21wb25lbnQubmFtZSk7XG4gICAgaWYgKCFleGlzdGluZ0NvbXBvbmVudERlZmluaXRpb24pIHtcbiAgICAgICAgaWYgKGNvbXBvbmVudC5uYW1lLnN0YXJ0c1dpdGgoJ2NvcmU6OicpKSB7XG4gICAgICAgICAgICBpZiAoY29tcG9uZW50Lm5hbWUgaW4gY29tcG9uZW50RGVmaW5pdGlvbkJ5TmFtZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb25lbnREZWZpbml0aW9uQnlOYW1lW2NvbXBvbmVudC5uYW1lXShlbmdpbmUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgY29yZSBjb21wb25lbnQgJHtjb21wb25lbnQubmFtZX0gd2FzIG5vdCBmb3VuZC5gKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChjb21wb25lbnQuanNvblNjaGVtYSkge1xuICAgICAgICAgICAgcmV0dXJuIGVuZ2luZS5kZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hKGNvbXBvbmVudC5uYW1lLCBTY2hlbWFzLmZyb21Kc29uKGNvbXBvbmVudC5qc29uU2NoZW1hKSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3Io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VudERlZmluaXRpb24uc2NoZW1hLmpzb25TY2hlbWEsIGNvbXBvbmVudFZhbHVlLCAodmFsdWUsIHZhbHVlVHlwZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWVUeXBlLnNlcmlhbGl6YXRpb25UeXBlID09PSAnZW50aXR5Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgY2hhbmdlZDogdHJ1ZSwgdmFsdWU6IGdldENvbXBvc2l0ZUVudGl0eSh2YWx1ZSkgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGNoYW5nZWQ6IGZhbHNlIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBjb25zdCBjb21wb3NpdGUgPSBDb21wb3NpdGVSb290Q29tcG9uZW50LmdldE11dGFibGVPck51bGwoY29tcG9zaXRlUm9vdEVudGl0eSkgfHwgQ29tcG9zaXRlUm9vdENvbXBvbmVudC5jcmVhdGUoY29tcG9zaXRlUm9vdEVudGl0eSk7XG4gICAgZm9yIChjb25zdCBbZW50aXR5U291cmNlLCB0YXJnZXRFbnRpdHldIG9mIG1hcHBlZEVudGl0aWVzKSB7XG4gICAgICAgIGNvbXBvc2l0ZS5lbnRpdGllcy5wdXNoKHtcbiAgICAgICAgICAgIHNyYzogZW50aXR5U291cmNlLFxuICAgICAgICAgICAgZGVzdDogdGFyZ2V0RW50aXR5XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBjb21wb3NpdGUuc3JjID0gY29tcG9zaXRlUmVzb3VyY2Uuc3JjO1xuICAgIHJldHVybiBjb21wb3NpdGVSb290RW50aXR5O1xufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1Z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gICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VDb21wb25lbnREYXRhKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YSA9IHsgJGNhc2U6IFwianNvblwiLCBqc29uOiBWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kYXRhID0geyAkY2FzZTogXCJiaW5hcnlcIiwgYmluYXJ5OiByZWFkZXIuYnl0ZXMoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvbmVudERhdGEuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZGF0YTogaXNTZXQob2JqZWN0Lmpzb24pXG4gICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImpzb25cIiwganNvbjogb2JqZWN0Lmpzb24gfVxuICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LmJpbmFyeSlcbiAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImJpbmFyeVwiLCBiaW5hcnk6IGJ5dGVzRnJvbUJhc2U2NChvYmplY3QuYmluYXJ5KSB9XG4gICAgICAgICAgICAgICAgICAgIDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgIH1cbiAgICBDb21wb25lbnREYXRhLmZyb21KU09OID0gZnJvbUpTT047XG4gICAgZnVuY3Rpb24gdG9KU09OKG1lc3NhZ2UpIHtcbiAgICAgICAgY29uc3Qgb2JqID0ge307XG4gICAgICAgIG1lc3NhZ2UuZGF0YT8uJGNhc2UgPT09IFwianNvblwiICYmIChvYmouanNvbiA9IG1lc3NhZ2UuZGF0YT8uanNvbik7XG4gICAgICAgIG1lc3NhZ2UuZGF0YT8uJGNhc2UgPT09IFwiYmluYXJ5XCIgJiZcbiAgICAgICAgICAgIChvYmouYmluYXJ5ID0gbWVzc2FnZS5kYXRhPy5iaW5hcnkgIT09IHVuZGVmaW5lZCA/IGJhc2U2NEZyb21CeXRlcyhtZXNzYWdlLmRhdGE/LmJpbmFyeSkgOiB1bmRlZmluZWQpO1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbiAgICBDb21wb25lbnREYXRhLnRvSlNPTiA9IHRvSlNPTjtcbn0pKENvbXBvbmVudERhdGEgfHwgKENvbXBvbmVudERhdGEgPSB7fSkpO1xuZnVuY3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2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZUNvbXBvbmVudCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuanNvblNjaGVtYSA9IFZhbHVlLnVud3JhcChWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZW50cnkzID0gQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZW50cnkzLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YS5zZXQoZW50cnkzLmtleSwgZW50cnkzLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBuYW1lOiBpc1NldChvYmplY3QubmFtZSkgPyBTdHJpbmcob2JqZWN0Lm5hbWUpIDogXCJcIixcbiAgICAgICAgICAgIGpzb25TY2hlbWE6IGlzU2V0KG9iamVjdD8uanNvblNjaGVtYSkgPyBvYmplY3QuanNvblNjaGVtYSA6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGRhdGE6IGlzT2JqZWN0KG9iamVjdC5kYXRhKVxuICAgICAgICAgICAgICAgID8gT2JqZWN0LmVudHJpZXMob2JqZWN0LmRhdGEpLnJlZHVjZSgoYWNjLCBba2V5LCB2YWx1ZV0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgYWNjLnNldChOdW1iZXIoa2V5KSwgQ29tcG9uZW50RGF0YS5mcm9tSlNPTih2YWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICAgICAgICAgIH0sIG5ldyBNYXAoKSlcbiAgICAgICAgICAgICAgICA6IG5ldyBNYXAoKSxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50LmZyb21KU09OID0gZnJvbUpTT047XG4gICAgZnVuY3Rpb24gdG9KU09OKG1lc3NhZ2UpIHtcbiAgICAgICAgY29uc3Qgb2JqID0ge307XG4gICAgICAgIG1lc3NhZ2UubmFtZSAhPT0gdW5kZWZpbmVkICYmIChvYmoubmFtZSA9IG1lc3NhZ2UubmFtZSk7XG4gICAgICAgIG1lc3NhZ2UuanNvblNjaGVtYSAhPT0gdW5kZWZpbmVkICYmIChvYmouanNvblNjaGVtYSA9IG1lc3NhZ2UuanNvblNjaGVtYSk7XG4gICAgICAgIG9iai5kYXRhID0ge307XG4gICAgICAgIGlmIChtZXNzYWdlLmRhdGEpIHtcbiAgICAgICAgICAgIG1lc3NhZ2UuZGF0YS5mb3JFYWNoKCh2LCBrKSA9PiB7XG4gICAgICAgICAgICAgICAgb2JqLmRhdGFba10gPSBDb21wb25lbnREYXRhLnRvSlNPTih2KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudC50b0pTT04gPSB0b0pTT047XG59KShDb21wb3NpdGVDb21wb25lbnQgfHwgKENvbXBvc2l0ZUNvbXBvbmVudCA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeSgpIHtcbiAgICByZXR1cm4geyBrZXk6IDAsIHZhbHVlOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIENvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnk7XG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AgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtleSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gQ29tcG9uZW50RGF0YS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAga2V5OiBpc1NldChvYmplY3Qua2V5KSA/IE51bWJlcihvYmplY3Qua2V5KSA6IDAsXG4gICAgICAgICAgICB2YWx1ZTogaXNTZXQob2JqZWN0LnZhbHVlKSA/IENvbXBvbmVudERhdGEuZnJvbUpTT04ob2JqZWN0LnZhbHVlKSA6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFb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G4gICAgICAgICAgICBDb21wb3NpdGVDb21wb25lbnQuZW5jb2RlKHYsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgQ29tcG9zaXRlRGVmaW5pdGlvbi5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZURlZmluaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZlcnNpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb21wb25lbnRzLnB1c2goQ29tcG9zaXRlQ29tcG9uZW50LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmVyc2lvbjogaXNTZXQob2JqZWN0LnZlcnNpb24pID8gTnVtYmVyKG9iamVjdC52ZXJzaW9uKSA6IDAsXG4gICAgICAgICAgICBjb21wb25lbnRzOiBBcnJheS5pc0FycmF5KG9iamVjdD8uY29tcG9uZW50cylcbiAgICAgICAgICAgICAgICA/IG9iamVjdC5jb21wb25lbnRzLm1hcCgoZSkgPT4gQ29tcG9zaXRlQ29tcG9uZW50LmZyb21KU09OKGUpKVxuICAgICAgICAgICAgICAgIDogW10sXG4gICAgICAgIH07XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgbWVzc2FnZS52ZXJzaW9uICE9PSB1bmRlZmluZWQgJiYgKG9iai52ZXJzaW9uID0gTWF0aC5yb3VuZChtZXNzYWdlLnZlcnNpb24pKTtcbiAgICAgICAgaWYgKG1lc3NhZ2UuY29tcG9uZW50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gcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVN0cnVjdCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBlbnRyeTEgPSBTdHJ1Y3RfRmllbGRzRW50cnkuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVudHJ5MS52YWx1ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpZWxkcy5zZXQoZW50cnkxLmtleSwgZW50cnkxLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFN0cnVjdC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBmaWVsZHM6IGlzT2JqZWN0KG9iamVjdC5maWVsZHMpXG4gICAgICAgICAgICAgICAgPyBPYmplY3QuZW50cmllcyhvYmplY3QuZmllbGRzKS5yZWR1Y2UoKGFjYywgW2tleSwgdmFsdWVdKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGFjYy5zZXQoa2V5LCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgICAgICAgICAgfSwgbmV3IE1hcCgpKVxuICAgICAgICAgICAgICAgIDogbmV3IE1hcCgpLFxuICAgICAgICB9O1xuICAgIH1cbiAgICBTdHJ1Y3QuZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgb2JqLmZpZWxkcyA9IHt9O1xuICAgICAgICBpZiAobWVzc2FnZS5maWVsZHMpIHtcbiAgICAgICAgICAgIG1lc3NhZ2UuZmllbGRzLmZvckVhY2goKHYsIGspID0+IHtcbiAgICAgICAgICAgICAgICBvYmouZmllbGRzW2tdID0gdjtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIFN0cnVjdC50b0pTT04gPSB0b0pTT047XG4gICAgZnVuY3Rpb24gd3JhcChvYmplY3QpIHtcbiAgICAgICAgY29uc3Qgc3RydWN0ID0gY3JlYXRlQmFzZVN0cnVjdCgpO1xuICAgICAgICBpZiAob2JqZWN0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKG9iamVjdCkuZm9yRWFjaCgoa2V5KSA9PiB7XG4gICAgICAg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x1ZSksIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgU3RydWN0X0ZpZWxkc0VudHJ5LmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlU3RydWN0X0ZpZWxkc0VudHJ5KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2V5ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gVmFsdWUud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dGVCYXNlVmFsdWUoKSB7XG4gICAgcmV0dXJuIHsga2luZDogdW5kZWZpbmVkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBWYWx1ZTtcbihmdW5jdGlvbiAoVmFsdWUpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2Uua2luZD8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJudWxsVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDgpLmludDMyKG1lc3NhZ2Uua2luZC5udWxsVmFsdWUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcIm51bWJlclZhbHVlXCI6XG4gICAgICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNykuZG91YmxlKG1lc3NhZ2Uua2luZC5udW1iZXJWYWx1ZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwic3RyaW5nVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDI2KS5zdHJpbmcobWVzc2FnZS5raW5kLnN0cmluZ1ZhbHVlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJib29sVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDMyKS5ib29sKG1lc3NhZ2Uua2luZC5ib29sVmFsdWUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInN0cnVjdFZhbHVlXCI6XG4gICAgICAgICAgICAgICAgU3RydWN0LmVuY29kZShTdHJ1Y3Qud3JhcChtZXNzYWdlLmtpbmQuc3RydWN0VmFsdWUpLCB3cml0ZXIudWludDMyKDQyKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImxpc3RWYWx1ZVwiOlxuICAgICAgICAgICAgICAgIExpc3RWYWx1ZS5lbmNvZGUoTGlzdFZhbHVlLndyYXAobWVzc2FnZS5raW5kLmxpc3RWYWx1ZSksIHdyaXRlci51aW50MzIoNTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVmFsdWUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWYWx1ZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwibnVsbFZhbHVlXCIsIG51bGxWYWx1ZTogcmVhZGVyLmludDMyKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJudW1iZXJWYWx1ZVwiLCBudW1iZXJWYWx1ZTogcmVhZGVyLmRvdWJsZSgpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwic3RyaW5nVmFsdWVcIiwgc3RyaW5nVmFsdWU6IHJlYWRlci5zdHJpbmcoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtpbmQgPSB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IHJlYWRlci5ib29sKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJzdHJ1Y3RWYWx1ZVwiLCBzdHJ1Y3RWYWx1ZTogU3RydWN0LnVud3JhcChTdHJ1Y3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJsaXN0VmFsdWVcIiwgbGlzdFZhbHVlOiBMaXN0VmFsdWUudW53cmFwKExpc3RWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZhbHVlLmRlY29kZSA9IGRlY29kZTtcbiAgICBmdW5jdGlvbiBmcm9tSlNPTihvYmplY3QpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGtpbmQ6IGlzU2V0KG9iamVjdC5udWxsVmFsdWUpXG4gICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bGxWYWx1ZVwiLCBudWxsVmFsdWU6IG51bGxWYWx1ZUZyb21KU09OKG9iamVjdC5udWxsVmFsdWUpIH1cbiAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5udW1iZXJWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bWJlclZhbHVlXCIsIG51bWJlclZhbHVlOiBOdW1iZXIob2JqZWN0Lm51bWJlclZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LnN0cmluZ1ZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcInN0cmluZ1ZhbHVlXCIsIHN0cmluZ1ZhbHVlOiBTdHJpbmcob2JqZWN0LnN0cmluZ1ZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5ib29sVmFsdWUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IEJvb2xlYW4ob2JqZWN0LmJvb2xWYWx1ZSkgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LnN0cnVjdFZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHsgJGNhc2U6IFwic3RydWN0VmFsdWVcIiwgc3RydWN0VmFsdWU6IG9iamVjdC5zdHJ1Y3RWYWx1ZSB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0Lmxpc3RWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8geyAkY2FzZTogXCJsaXN0VmFsdWVcIiwgbGlzdFZhbHVlOiBbLi4ub2JqZWN0Lmxpc3RWYWx1ZV0gfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgfVxuICAgIFZhbHVlLmZyb21KU09OID0gZnJvbUpTT047XG4gICAgZnVuY3Rpb24gdG9KU09OKG1lc3NhZ2UpIHtcbiAgICAgICAgY29uc3Qgb2JqID0ge307XG4gICAgICAgIG1lc3NhZ2Uua2luZD8uJGNhc2UgPT09IFwibnVsb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IHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52YWx1ZXMucHVzaChWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIExpc3RWYWx1ZS5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7IHZhbHVlczogQXJyYXkuaXNBcnJheShvYmplY3Q/LnZhbHVlcykgPyBbLi4ub2JqZWN0LnZhbHVlc10gOiBbXSB9O1xuICAgIH1cbiAgICBMaXN0VmFsdWUuZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgaWYgKG1lc3NhZ2UudmFsdWVzKSB7XG4gICAgICAgICAgICBvYmoudmFsdWVzID0gbWVzc2FnZS52YWx1ZXMubWFwKChlKSA9PiBlKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIG9iai52YWx1ZXMgPSBbXTtcbiAgICAgICAgfVxuICAgICAgICByZX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gVmVjdG9yM1xuICAgICAqL1xuICAgIGZ1bmN0aW9uIGNhdG11bGxSb20odmFsdWUxLCB2YWx1ZTIsIHZhbHVlMywgdmFsdWU0LCBhbW91bnQpIHtcbiAgICAgICAgY29uc3Qgc3F1YXJlZCA9IGFtb3VudCAqIGFtb3VudDtcbiAgICAgICAgY29uc3QgY3ViZWQgPSBhbW91bnQgKiBzcXVhcmVkO1xuICAgICAgICBjb25zdCB4ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueCArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueCArIHZhbHVlMy54KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS54IC0gNS4wICogdmFsdWUyLnggKyA0LjAgKiB2YWx1ZTMueCAtIHZhbHVlNC54KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnggKyAzLjAgKiB2YWx1ZTIueCAtIDMuMCAqIHZhbHVlMy54ICsgdmFsdWU0LngpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB5ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueSArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueSArIHZhbHVlMy55KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS55IC0gNS4wICogdmFsdWUyLnkgKyA0LjAgKiB2YWx1ZTMueSAtIHZhbHVlNC55KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnkgKyAzLjAgKiB2YWx1ZTIueSAtIDMuMCAqIHZhbHVlMy55ICsgdmFsdWU0LnkpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB6ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueiArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueiArI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0MyArXG4gICAgICAgICAgICB0YW5nZW50Mi54ICogcGFydDQ7XG4gICAgICAgIGNvbnN0IHkgPSB2YWx1ZTEueSAqIHBhcnQxICtcbiAgICAgICAgICAgIHZhbHVlMi55ICogcGFydDIgK1xuICAgICAgICAgICAgdGFuZ2VudDEueSAqIHBhcnQzICtcbiAgICAgICAgICAgIHRhbmdlbnQyLnkgKiBwYXJ0NDtcbiAgICAgICAgY29uc3QgeiA9IHZhbHVlMS56ICogcGFydDEgK1xuICAgICAgICAgICAgdmFsdWUyLnogKiBwYXJ0MiArXG4gICAgICAgICAgICB0YW5nZW50MS56ICogcGFydDMgK1xuICAgICAgICAgICAgdGFuZ2VudDIueiAqIHBhcnQ0O1xuICAgICAgICByZXR1cm4gY3JlYXRlKHgsIHksIHopO1xuICAgIH1cbiAgICBWZWN0b3IzLmhlcm1pdGUgPSBoZXJtaXRlO1xuICAgIC8qKlxuICAgICAqIEdldHMgdGhlIG1pbmltYWwgY29vcmRpbmF0ZSB2YWx1ZXMgYmV0d2VlbiB0d28gVmVjdG9yM1xuICAgICAqIEBwYXJhbSBsZWZ0IC0gZGVmaW5lcyB0aGUgZmlyc3Qgb3BlcmFuZFxuICAgICAqIEBwYXJhbSByaWdodCAtIGRlZmluZXMgdGhlIHNlY29uZCBvcGVyYW5kXG4gICAgICogQHJldHVybnMgdGhlIG5ldyBWZWN0b3IzXG4gICAgICovXG4gICAgZnVuY3Rpb24gbWluaW1pemUobGVmdCwgcmlnaHQpIHtcbiAgICAgICAgY29uc3QgbWluID0gY3JlYXRlKCk7XG4gICAgICAgIG1pbmltaXplSW5QbGFjZUZyb21GbG9hdHNUb1JlZihyaWdodCwgbGVmdC54LCBsZWZ0LnksIGxlZnQueiwgbWluKTtcbiAgICAgICAgcmV0dXJuIG1pbjtcbiAgICB9XG4gICAgVmVjdG9yMy5taW5pbWl6ZSA9IG1pbmltaXplO1xuICAgIC8qKlxuICAgICAqIEdldHMgdGhlIG1heGltYWwgY29vcmRpbmF0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osIHJlc3VsdCkge1xuICAgICAgICBpZiAoeCA8IHZlY3RvcjEueCkge1xuICAgICAgICAgICAgcmVzdWx0LnggPSB4O1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcmVzdWx0LnggPSB2ZWN0b3IxLng7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHkgPCB2ZWN0b3IxLnkpIHtcbiAgICAgICAgICAgIHJlc3VsdC55ID0geTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHJlc3VsdC55ID0gdmVjdG9yMS55O1xuICAgICAgICB9XG4gICAgICAgIGlmICh6IDwgdmVjdG9yMS56KSB7XG4gICAgICAgICAgICByZXN1bHQueiA9IHo7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXN1bHQueiA9IHZlY3RvcjEuejtcbiAgICAgICAgfVxuICAgIH1cbiAgICBWZWN0b3IzLm1pbmltaXplSW5QbGFjZUZyb21GbG9hdHNUb1JlZiA9IG1pbmltaXplSW5QbGFjZUZyb21GbG9hdHNUb1JlZjtcbiAgICAvKipcbiAgICAgKiBHZXRzIGEgbmV3IFZlY3RvcjMgZnJvbSB2ZWN0b3IxIGZsb29yZWQgdmFsdWVzXG4gICAgICogQHJldHVybnMgYSBuZXcgVmVjdG9yM1xuICAgICAqL1xuICAgIGZ1bmN0aW9uIGZsb29yKHZlY3RvcjEpIHtcbiAgICAgICAgcmV0dXJuIGNyZWF0ZShNYXRoLmZsb29yKHZlY3RvcjEueCksIE1hdGguZmxvb3IodmVjdG9yMS55KSwgTWF0aC5mbG9vcih2ZWN0b3IxLnopKTtcbiAgICB9XG4gICAgVmVjdG9yMy5mbG9vciA9IGZsb29yO1xuICAgIC8qKlxuICAgICAqIEdldHMgYSBuZXcgVmVjdG9yMyBmcm9tIHZlY3RvcjEgZmxvb3JlZCB2YWx1ZXNcbiAgICAgKiBAcmV0dXJucyBhIG5ldyBWZWN0b3IzX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mVcbiAgICAgKiBAcGFyYW0gcG9pbnQzIC0gb25lIG9mIHRoZSBwb2ludHMgdXNlZCB0byBjb250cnVjdCB0aGUgcGxhbmVcbiAgICAgKiBAcmV0dXJucyB0aGUgdXBkYXRlZCBQbGFuZS5cbiAgICAgKi9cbiAgICBmdW5jdGlvbiBjb3B5RnJvbVBvaW50cyhwb2ludDEsIHBvaW50MiwgcG9pbnQzKSB7XG4gICAgICAgIGNvbnN0IHgxID0gcG9pbnQyLnggLSBwb2ludDEueDtcbiAgICAgICAgY29uc3QgeTEgPSBwb2ludDIueSAtIHBvaW50MS55O1xuICAgICAgICBjb25zdCB6MSA9IHBvaW50Mi56IC0gcG9pbnQxLno7XG4gICAgICAgIGNvbnN0IHgyID0gcG9pbnQzLnggLSBwb2ludDEueDtcbiAgICAgICAgY29uc3QgeTIgPSBwb2ludDMueSAtIHBvaW50MS55O1xuICAgICAgICBjb25zdCB6MiA9IHBvaW50My56IC0gcG9pbnQxLno7XG4gICAgICAgIGNvbnN0IHl6ID0geTEgKiB6MiAtIHoxICogeTI7XG4gICAgICAgIGNvbnN0IHh6ID0gejEgKiB4MiAtIHgxICogejI7XG4gICAgICAgIGNvbnN0IHh5ID0geDEgKiB5MiAtIHkxICogeDI7XG4gICAgICAgIGNvbnN0IHB5dGggPSBNYXRoLnNxcnQoeXogKiB5eiArIHh6ICogeHogKyB4eSAqIHh5KTtcbiAgICAgICAgbGV0IGludlB5dGg7XG4gICAgICAgIGlmIChweXRoICE9PSAwKSB7XG4gICAgICAgICAgICBpbnZQeXRoID0gMS4wIC8gcHl0aDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGludlB5dGggPSAwLjA7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3Qgbm9ybWFsID0gVmVjdG9yMy5jcmVhdGUoeXogKiBpbnZQeXRoLCB4eiAqIGludlB5dGgsIHh5ICogaW52UHl0aCk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICA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uVG9SZWYgPSBmcm9tUXVhdGVybmlvblRvUmVmO1xuICAgIC8qKiBAaW50ZXJuYWwgKi9cbiAgICBmdW5jdGlvbiBfbWFya0FzVXBkYXRlZChzZWxmKSB7XG4gICAgICAgIHNlbGYudXBkYXRlRmxhZyA9IF91cGRhdGVGbGFnU2VlZCsrO1xuICAgICAgICBzZWxmLmlzSWRlbnRpdHkgPSBmYWxzZTtcbiAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gZmFsc2U7XG4gICAgICAgIHNlbGYuX2lzSWRlbnRpdHlEaXJ0eSA9IHRydWU7XG4gICAgICAgIHNlbGYuX2lzSWRlbnRpdHkzeDJEaXJ0eSA9IHRydWU7XG4gICAgfVxuICAgIC8vIFByb3BlcnRpZXNcbiAgICAvKipcbiAgICAgKiBDaGVjayBpZiB0aGUgY3VycmVudCBtYXRyaXggaXMgaWRlbnRpdHlcbiAgICAgKiBAcmV0dXJucyB0cnVlIGlzIHRoZSBtYXRyaXggaXMgdGhlIGlkZW50aXR5IG1hdHJpeFxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGlzSWRlbnRpdHlVcGRhdGUoc2VsZikge1xuICAgICAgICBpZiAoc2VsZi5faXNJZGVudGl0eURpcnR5KSB7XG4gICAgICAgICAgICBzZWxmLl9pc0lkZW50aXR5RGlydHkgPSBmYWxzZTtcbiAgICAgICAgICAgIGNvbnN0IG0gPSBzZWxmLl9tO1xuICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5ID1cbiAgICAgICAgICAgICAgICBtWzBdID09PSAxLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMl0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzNdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bNV0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzZdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs3XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bOF0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzldID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxMF0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzExXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTJdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxM10gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzE0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTVdID09PSAxLjA7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHNlbGYuaXNJZGVudGl0eTtcbiAgICB9XG4gICAgTWF0cml4LmlzSWRlbnRpdHlVcGRhdGUgPSBpc0lkZW50aXR5VXBkYXRlO1xuICAgIC8qKlxuICAgICAqIENoZWNrIGlmIHRoZSBjdXJyZW50IG1hdHJpeCBpcyBpZGVudGl0eSBhcyBhIHRleHR1cmUgbWF0cml4ICgzeDIgc3RvcmUgaW4gNHg0KVxuICAgICAqIEByZXR1cm5zIHRydWUgaXMgdGhlIG1hdHJpeCBpcyB0aGUgaWRlbnRpdHkgbWF0cml4XG4gICAgICovXG4gICAgZnVuY3Rpb24gaXNJZGVudGl0eUFzM3gyVXBkYXRlKHNlbGYpIHtcbiAgICAgICAgaWYgKHNlbGYuX2lzSWRlbnRpdHkzeDJEaXJ0eSkge1xuICAgICAgICAgICAgc2VsZi5faXNJZGVudGl0eTN4MkRpcnR5ID0gZmFsc2U7XG4gICAgICAgICAgICBpZiAoc2VsZi5fbVswXSAhPT0gMS4wIHx8IHNlbGYuX21bNV0gIT09IDEuMCB8fCBzZWxmLl9tWzE1XSAhPT0gMS4wKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChzZWxmLl9tWzFdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzJdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzNdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzRdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzZdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzddICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzhdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzldICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzEwXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxMV0gIT09IDAuMCB8fFxuICAgICAgICAgICAgICAgIHNlbGYuX21bMTJdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzEzXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxNF0gIT09IDAuMCkge1xuICAgICAgICAgICAgICAgIHNlbGYuaXNJZGVudGl0eTN4MiA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5M3gyO1xuICAgIH1cbiAgICBNYXRyaXguaXNJZGVudGl0eUFzM3gyVXBkYXRlID0gaXNJZGVudGl0eUFzM3gyVXBkYXRlO1xuICAgIC8qKlxuICAgICAqIEdldHMgdGhlIGRldGVybWluYW50IG9mIHRoZSBtYXRyaXh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25zdCBjb2ZhY3RfMDIgPSArKG0xMCAqIGRldF8yMV8zMyAtIG0xMSAqIGRldF8yMF8zMyArIG0xMyAqIGRldF8yMF8zMSk7XG4gICAgICAgIGNvbnN0IGNvZmFjdF8wMyA9IC0obTEwICogZGV0XzIxXzMyIC0gbTExICogZGV0XzIwXzMyICsgbTEyICogZGV0XzIwXzMxKTtcbiAgICAgICAgY29uc3QgZGV0ID0gbTAwICogY29mYWN0XzAwICsgbTAxICogY29mYWN0XzAxICsgbTAyICogY29mYWN0XzAyICsgbTAzICogY29mYWN0XzAzO1xuICAgICAgICBpZiAoZGV0ID09PSAwKSB7XG4gICAgICAgICAgICBjb3B5KHNvdXJjZSwgcmVzdWx0KTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBkZXRJbnYgPSAxIC8gZGV0O1xuICAgICAgICBjb25zdCBkZXRfMTJfMzMgPSBtMTIgKiBtMzMgLSBtMzIgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMV8zMyA9IG0xMSAqIG0zMyAtIG0zMSAqIG0xMztcbiAgICAgICAgY29uc3QgZGV0XzExXzMyID0gbTExICogbTMyIC0gbTMxICogbTEyO1xuICAgICAgICBjb25zdCBkZXRfMTBfMzMgPSBtMTAgKiBtMzMgLSBtMzAgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMF8zMiA9IG0xMCAqIG0zMiAtIG0zMCAqIG0xMjtcbiAgICAgICAgY29uc3QgZGV0XzEwXzMxID0gbTEwICogbTMxIC0gbTMwICogbTExO1xuICAgICAgICBjb25zdCBkZXRfMTJfMjMgPSBtMTIgKiBtMjMgLSBtMjIgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMV8yMyA9IG0xMSAqIG0yMyAtIG0yMSAqIG0xMztcbiAgICAgICAgY29uc3QgZGV0XzExXzIyID0gbTExICogbTIyIC0gbTIxICogbTEyO1xuICAgICAgICBjb25zdCBkZXRfMTBfMjMgPS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0gb3RoZXJNWzFdLCBvbTIgPSBvdGhlck1bMl0sIG9tMyA9IG90aGVyTVszXTtcbiAgICAgICAgY29uc3Qgb200ID0gb3RoZXJNWzRdLCBvbTUgPSBvdGhlck1bNV0sIG9tNiA9IG90aGVyTVs2XSwgb203ID0gb3RoZXJNWzddO1xuICAgICAgICBjb25zdCBvbTggPSBvdGhlck1bOF0sIG9tOSA9IG90aGVyTVs5XSwgb20xMCA9IG90aGVyTVsxMF0sIG9tMTEgPSBvdGhlck1bMTFdO1xuICAgICAgICBjb25zdCBvbTEyID0gb3RoZXJNWzEyXSwgb20xMyA9IG90aGVyTVsxM10sIG9tMTQgPSBvdGhlck1bMTRdLCBvbTE1ID0gb3RoZXJNWzE1XTtcbiAgICAgICAgLy8gdHNsaW50OmVuYWJsZTpvbmUtdmFyaWFibGUtcGVyLWRlY2xhcmF0aW9uXG4gICAgICAgIHJlc3VsdFtvZmZzZXRdID0gdG0wICogb20wICsgdG0xICogb200ICsgdG0yICogb204ICsgdG0zICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDFdID0gdG0wICogb20xICsgdG0xICogb201ICsgdG0yICogb205ICsgdG0zICogb20xMztcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDJdID0gdG0wICogb20yICsgdG0xICogb202ICsgdG0yICogb20xMCArIHRtMyAqIG9tMTQ7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyAzXSA9IHRtMCAqIG9tMyArIHRtMSAqIG9tNyArIHRtMiAqIG9tMTEgKyB0bTMgKiBvbTE1O1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNF0gPSB0bTQgKiBvbTAgKyB0bTUgKiBvbTQgKyB0bTYgKiBvbTggKyB0bTcgKiBvbTEyO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNV0gPSB0bTQgKiBvbTEgKyB0bTUgKiBvbTUgKyB0bTYgKiBvbTkgKyB0bTcgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNl0gPSB0bTQgKiBvbTIgKyB0bTUgKiBvbTYgKyB0bTYgKiBvbTEwICsgdG03ICogb20xNDtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDddID0gdG00ICogb20zICsgdG01ICogb203ICsgdG02ICogb20xMSArIHRtNyAqIG9tMTU7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyA4XSA9IHRtOCAqIG9tMCArIHRtOSAqIG9tNCArIHRtMTAgKiBvbTggKyB0bTExICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDldID0gdG04ICogb20xICsgdG05ICogb201ICsgdG0xMCAqIG9tOSArIHRtMTEgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTBdID0gdG04ICogb20yICsgdG05ICogb202ICsgdG0xMCAqIG9tMTAgKyB0bTExICogb20xNDtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDExXSA9IHRtOCAqIG9tMyArIHRtOSAqIG9tNyArIHRtMTAgKiBvbTExICsgdG0xMSAqIG9tMTU7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyAxMl0gPSB0bTEyICogb20wICsgdG0xMyAqIG9tNCArIHRtMTQgKiBvbTggKyB0bTE1ICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDEzXSA9IHRtMTIgKiBvbTEgKyB0bTEzICogb201ICsgdG0xNCAqIG9tOSArIHRtMTUgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTRdID0gdG0xMiAqIG9tMiArIHRtMTMgKiBvbTYgKyB0bTE0ICogb20xMCArIHRtMTUgKiBvbTE0O1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTVdID0gdG0xMiAqIG9tMyArIHRtMTMgKiBvbTcgKyB0bTE0ICogb20xMSArIHRtMTUgKiBvbTE1O1xuICAgIH1cbiAgICBNYXRyaXgubXVsdGlwbHlUb0FycmF5ID0gbXVsdGlwbHlUb0FycmF5O1xuICAgIC8qKlxuICAgICAqIENoZWNrIGVxdWFsaXR5IGJldHdlZW4gc2VsZiBtYXRyaXggYW5kIGEgc2Vjb25kIG9uZVxuICAgICAqIEBwYXJhbSB2YWx1ZSAtIGRlZmluZXMgdGhlIHNlY29uZCBtYXRyaXggdG8gY29tcGFyZVxuICAgICAqIEByZXR1cm5zIHRydWUgaXMgdGhlIGN1cnJlbnQgbWF0cml4IGFuZCB0aGUgZ2l2ZW4gb25lIHZhbHVlcyBhcmUgc3RyaWN0bHkgZXF1YWxcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBlcXVhbHMoc2VsZiwgdmFsdWUpIHtcbiAgICAgICAgY29uc3Qgb3RoZXIgPSB2YWx1ZTtcbiAgICAgICAgaWYgKCFvdGhlcikge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzZWxmLmlzSWRlbnRpdHkgfHwgb3RoZXIuaXNJZGVudGl0eSkge1xuICAgICAgICAgICAgaWYgKCFzZWxmLl9pc0lkZW50aXR5RGlydHkgJiYgIW90aGVyLl9pc0lkZW50aXR5RGlydHkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5ICYmIG90aGVyLmlzSWRlbnRpdHk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbSA9IHNlbGYuX207XG4gICAgICAgIGNvbnN0IG9tID0gb3RoZXIuX207XG4gICAgICAgIHJldHVybiAobVswXSA9PT0gb21bMF0gJiZcbiAgICAgICAgICAgIG1bMV0gPT09IG9tWzFdICYmXG4gICAgICAgICAgICBtWzJdID09PSBvbVsyXSAmJlxuICAgICAgICAgICAgbVszXSA9PT0gb21bM10gJiZcbiAgICAgICAgICAgIG1bNF0gPT09IG9tWzRdICYmXG4gICAgICAgICAgICBtWzVdID09PSBvbVs1XSAmJlxuICAgICAgICAgICAgbVs2XSA9PT0gb21bNl0gJiZcbiAgICAgICAgICAgIG1bN10gPT09IG9tWzddICYmXG4gICAgICAgICAgICBtWzhdID09PSBvbVs4XSAmJlxuICAgICAgICAgICAgbVs5XSA9PT0gb21bOV0gJiZcbiAgICAgICAgICAgIG1bMTBdID09PSBvbVsxMF0gJiZcbiAgICAgICAgICAgIG1bMTFdID09PSBvbVsxMV0gJiZcbiAgICAgICAgICAgIG1bMTJdID09PSBvbVsxMl0gJiZcbiAgICAgICAgICAgIG1bMTNdID09PSBvbVsxM10gJiZcbiAgICAgICAgICAgIG1bMTRdID09PSBvbVsxNF0gJiZcbiAgICAgICAgICAgIG1bMTVdID09PSBvbVsxNV0pO1xuICAgIH1cbiAgICBNYXRyaXguZXF1YWxzID0gZXF1YWxzO1xuICAgIC8qKlxuICAgICAqIENsb25lIHRoZSBjdXJyZW50IG1hdHJpeFxuICAgICAqIEByZXR1cm5zIGEgbmV3IG1hdHJpeCBmcm9tIHRoZSBjdXJyZW50IG1hdHJpeFxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGNsb25lKHNlbGYpIHtcbiAgICAgICAgY29uc3QgcmVzdWx0ID0gY3JlYXRlKCk7XG4gICAgICAgIGNvcHkoc2VsZiwgcmVzdWx0KTtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG4gICAgTWF0cml4LmNsb25lID0gY2xvbmU7XG4gICAgLyoqXG4gICAgICogR2V0cyB0aGUgaGFzaCBjb2RlIG9mIHRoZSBjdXJyZW50IG1hdHJpeFxuICAgICAqIEByZXR1cm5zIHRoZSBoYXNoIGNvZGVcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBnZXRIYXNoQ29kZShzZWxmKSB7XG4gICAgICAgIGxldCBoYXNoID0gc2VsZi5fbVswXSB8fCAwO1xuICAgICAgICBmb3IgKGxldCBpID0gMTsgaSA8IDE2OyBpKyspIHtcbiAgICAgICAgICAgIGhhc2ggPSAoaGFzaCAqIDM5NykgXiAoc2VsZi5fbVtpXSB8fCAwKTtcbiAgICAgICAgfVxuICAgICA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HNjYWxlLnogPSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHJvdGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgcm90YXRpb24udyA9IDE7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueCA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueSA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueiA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBtID0gc2VsZi5fbTtcbiAgICAgICAgaWYgKHRyYW5zbGF0aW9uKSB7XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi54ID0gbVsxMl07XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi55ID0gbVsxM107XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi56ID0gbVsxNF07XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXNlZFNjYWxlID0gc2NhbGUgfHwgVmVjdG9yMy5aZXJvKCk7XG4gICAgICAgIHVzZWRTY2FsZS54ID0gTWF0aC5zcXJ0KG1bMF0gKiBtWzBdICsgbVsxXSAqIG1bMV0gKyBtWzJdICogbVsyXSk7XG4gICAgICAgIHVzZWRTY2FsZS55ID0gTWF0aC5zcXJ0KG1bNF0gKiBtWzRdICsgbVs1XSAqIG1bNV0gKyBtWzZdICogbVs2XSk7XG4gICAgICAgIHVzZWRTY2FsZS56ID0gTWF0aC5zcXJ0KG1bOF0gKiBtWzhdICsgbVs5XSAqIG1bOV0gKyBtWzEwXSAqIG1bMTBdKTtcbiAgICAgICAgaWYgKGRldGVybWluYW50KHNlbGYpIDw9IDApIHtcbiAgICAgICAgICAgIHVzZWRTY2FsZS55ICo9IC0xO1xuICAgICAgICB9XG4gICAgICAgIGlmICh1c2VkU2NhbGUueCA9PT0gMCB8fCB1c2VkU2NhbGUueSA9PT0gMCB8fCB1c2VkU2NhbGUueiA9PT0gMCkge1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XMgaW4gd2hpY2ggZGlyZWN0aW9uIHVwIGlzXG4gICAgICovXG4gICAgZnVuY3Rpb24gbG9va1JvdGF0aW9uKGZvcndhcmQsIHVwID0geyB4OiAwLjAsIHk6IDEuMCwgejogMC4wIH0pIHtcbiAgICAgICAgY29uc3QgZm9yd2FyZE5ldyA9IFZlY3RvcjMubm9ybWFsaXplKGZvcndhcmQpO1xuICAgICAgICBjb25zdCByaWdodCA9IFZlY3RvcjMubm9ybWFsaXplKFZlY3RvcjMuY3Jvc3ModXAsIGZvcndhcmROZXcpKTtcbiAgICAgICAgY29uc3QgdXBOZXcgPSBWZWN0b3IzLmNyb3NzKGZvcndhcmROZXcsIHJpZ2h0KTtcbiAgICAgICAgY29uc3QgbTAwID0gcmlnaHQueDtcbiAgICAgICAgY29uc3QgbTAxID0gcmlnaHQueTtcbiAgICAgICAgY29uc3QgbTAyID0gcmlnaHQuejtcbiAgICAgICAgY29uc3QgbTEwID0gdXBOZXcueDtcbiAgICAgICAgY29uc3QgbTExID0gdXBOZXcueTtcbiAgICAgICAgY29uc3QgbTEyID0gdXBOZXcuejtcbiAgICAgICAgY29uc3QgbTIwID0gZm9yd2FyZE5ldy54O1xuICAgICAgICBjb25zdCBtMjEgPSBmb3J3YXJkTmV3Lnk7XG4gICAgICAgIGNvbnN0IG0yMiA9IGZvcndhcmROZXcuejtcbiAgICAgICAgY29uc3QgbnVtOCA9IG0wMCArIG0xMSArIG0yMjtcbiAgICAgICAgY29uc3QgcXVhdGVybmlvbiA9IGNyZWF0ZSgpO1xuICAgICAgICBpZiAobnVtOCA+IDApIHtcbiAgICAgICAgICAgIGxldCBudW0gPSBNYXRoLnNxcnQobnVtOCArIDEpO1xuICAgICAgICAgICAgcXVhdGVybmlvbi53ID0gbnVtICogMC41O1xuICAgICAgICAgICAgbnVtID0gMC41IC8gbnVtO1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gKG0xMiAtIG0yMSkgKiBudW07XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnkgPSAobTIwIC0gbTAyKSAqIG51bTtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDEgLSBtMTApICogbnVtO1xuICAgICAgICAgICAgcmV0dXJuIHF1YXRlcm5pb247XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG0wMCA+PSBtMTEgJiYgbTAwID49IG0yMikge1xuICAgICAgICAgICAgY29uc3QgbnVtNyA9IE1hdGguc3FydCgxICsgbTAwIC0gbTExIC0gbTIyKTtcbiAgICAgICAgICAgIGNvbnN0IG51bTQgPSAwLjUgLyBudW03O1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gMC41ICogbnVtNztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IChtMDEgKyBtMTApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDIgKyBtMjApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24udyA9IChtMTIgLSBtMjEpICogbnVtNDtcbiAgICAgICAgICAgIHJldHVybiBxdWF0ZXJuaW9uO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtMTEgPiBtMjIpIHtcbiAgICAgICAgICAgIGNvbnN0IG51bTYgPSBNYXRoLnNxcnQoMSArIG0xMSAtIG0wMCAtIG0yMik7XG4gICAgICAgICAgICBjb25zdCBudW0zID0gMC41IC8gbnVtNjtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueCA9IChtMTAgKyBtMDEpICogbnVtMztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IDAuNSAqIG51bTY7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnogPSAobTIxICsgbTEyKSAqIG51bTM7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLncgPSAobTIwIC0gbTAyKSAqIG51bTM7XG4gICAgICAgICAgICByZXR1cm4gcXVhdGVybmlvbjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBudW01ID0gTWF0aC5zcXJ0KDEgKyBt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V4YWN0bHkgb25lLiBPdGhlcndpc2UsIHRoaXMgYWN0cyBhcyBhIGNvcnJlY3Rpb24gZmFjdG9yIGZvciB0aGUgcXVhdGVybmlvbidzIG5vdC1ub3JtYWxpemVkbmVzc1xuICAgICAgICBjb25zdCB1bml0ID0gcS54ICogcS54ICsgcS55ICogcS55ICsgcS56ICogcS56ICsgcS53ICogcS53O1xuICAgICAgICAvLyBxIHdpbGwgaGF2ZSBhIG1hZ25pdHVkZSBvZiAwLjUgb3IgZ3JlYXRlciBpZiBhbmQgb25seSBpZiBxIGlzIGEgc2luZ3VsYXJpdHkgY2FzZVxuICAgICAgICBjb25zdCB0ZXN0ID0gcS54ICogcS53IC0gcS55ICogcS56O1xuICAgICAgICBpZiAodGVzdCA+IDAuNDk5NSAqIHVuaXQpIHtcbiAgICAgICAgICAgIC8vIHNpbmd1bGFyaXR5IGF0IG5vcnRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gTWF0aC5QSSAvIDI7XG4gICAgICAgICAgICBvdXQueSA9IDIgKiBNYXRoLmF0YW4yKHEueSwgcS54KTtcbiAgICAgICAgICAgIG91dC56ID0gMDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0ZXN0IDwgLTAuNDk5NSAqIHVuaXQpIHtcbiAgICAgICAgICAgIC8vIHNpbmd1bGFyaXR5IGF0IHNvdXRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gLU1hdGguUEkgLyAyO1xuICAgICAgICAgICAgb3V0LnkgPSAtMiAqIE1hdGguYXRhbjIocS55LCBxLngpO1xuICAgICAgICAgICAgb3V0LnogPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gbm8gc2luZ3VsYXJpdHkgLSBxIGlzIHRoZSBtYWpvcml0eSBvZiBjYXNlc1xuICAgICAgICAgICAgb3V0LnggPSBNYXRoLmFzaW4oMiAqIChxLncgKiBxLnggLSBxLnkgKiBxLnopKTtcbiAgICAgICAgICAgIG91dC55ID0gTWF0aC5hdGFuMigyICogcS53ICogcS55ICsgMiAqIHEueiAqIHEueCwgMSAtIDIgKiAocS54ICogcS54ICsgcS55ICogcS55KSk7XG4gICAgICAgICAgICBvdXQueiA9IE1hdGguYXRhbjIoMiAqIHEudyAqIHEueiArIDIgKiBxLnggKiBxLnksIDEgLSAyICogKHEueiAqIHEueiArIHEueCAqIHEueCkpO1xuICAgICAgICB9XG4gICAgICAgIG91dC54ICo9IFJBRDJERUc7XG4gICAgICAgIG91dC55ICo9IFJBRDJERUc7XG4gICAgICAgIG91dC56ICo9IFJBRDJERUc7XG4gICAgICAgIC8vIGVuc3VyZSB0aGUgZGVncmVlIHZhbHVlcyBhcmUgYmV0d2VlbiAwIGFuZCAzNjBcbiAgICAgICAgb3V0LnggPSBTY2FsYXIucmVwZWF0KG91dC54LCAzNjApO1xuICAgICAgICBvdXQueSA9IFNjYWxhci5yZXBlYXQob3V0LnksIDM2MCk7XG4gICAgICAgIG91dC56ID0gU2NhbGFyLnJlcGVhdChvdXQueiwgMzYwKTtcbiAgICAgICAgcmV0dXJuIG91dDtcbiAgICB9XG4gICAgUXVhdGVybmlvbi50b0V1bGVyQW5nbGVzID0gdG9FdWxlckFuZ2xlcztcbiAgICAvKipcbiAgICAgKiBDcmVhdGVzIGEgbmV3IHJvdGF0aW9uIGZyb20gdGhlIGdpdmVuIEV1bGVyIGZsb2F0IGFuZ2xlcyAoeSwgeCwgeikgYW5kIHN0b3JlcyBpdCBpbiB0aGUgdGFyZ2V0IHF1YXRlcm5pb25cbiAgICAgKiBAcGFyYW0geWF3IC0gZGVmaW5lcyB0aGUgcm90YXRpb24gYXJvdW5kIFkgYXhpcyAocmFkaWFucylcbiAgICAgKiBAcGFyYW0gcGl0Y2ggLSBkZWZpbmVzIHRoZSByb3RhdGlvbiBhcm91bmQgWCBheGlzIChyYWRpYW5zKVxuICAgICAqIEBwYXJhbSByb2xsIC0gZGVmaW5lcyB0aGUgcm90YXRpb24gYXJvdW5k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AgICByZXN1bHQueSA9IChtMTMgLSBtMzEpICogcztcbiAgICAgICAgICAgIHJlc3VsdC56ID0gKG0yMSAtIG0xMikgKiBzO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKG0xMSA+IG0yMiAmJiBtMTEgPiBtMzMpIHtcbiAgICAgICAgICAgIHMgPSAyLjAgKiBNYXRoLnNxcnQoMS4wICsgbTExIC0gbTIyIC0gbTMzKTtcbiAgICAgICAgICAgIHJlc3VsdC53ID0gKG0zMiAtIG0yMykgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnggPSAwLjI1ICogcztcbiAgICAgICAgICAgIHJlc3VsdC55ID0gKG0xMiArIG0yMSkgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnogPSAobTEzICsgbTMxKSAvIHM7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAobTIyID4gbTMzKSB7XG4gICAgICAgICAgICBzID0gMi4wICogTWF0aC5zcXJ0KDEuMCArIG0yMiAtIG0xMSAtIG0zMyk7XG4gICAgICAgICAgICByZXN1bHQudyA9IChtMTMgLSBtMzEpIC8gcztcbiAgICAgICAgICAgIHJlc3VsdC54ID0gKG0xMiArIG0yMSkgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnkgPSAwLjI1ICogcztcbiAgICAgICAgICAgIHJlc3VsdC56ID0gKG0yMyArIG0zMikgLyBzO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcyA9IDIuMCAqIE1hdGguc3FydCgxLjAgKyBtMzMgLSBtMTEgLSBtMjIpO1xuICAgICAgICAgICAgcmVzdWx0LncgPSAobTIxIC0gbTEyKSAvIHM7XG4gICAgICAgICAgICByZXN1bHQueCA9IChtMTMgKyBtMzEpIC8gcztcbiAgICAgICAgICAgIHJlc3VsdC55ID0gKG0yMyArIG0zMikgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnogPSAwLjI1ICogcztcbiAgICAgICAgfVxuICAgIH1cbiAgICBR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ldCBxdWF0ZXJuaW9uXG4gICAgICovXG4gICAgZnVuY3Rpb24gc2xlcnBUb1JlZihsZWZ0LCByaWdodCwgYW1vdW50LCByZXN1bHQpIHtcbiAgICAgICAgbGV0IG51bTI7XG4gICAgICAgIGxldCBudW0zO1xuICAgICAgICBsZXQgbnVtNCA9IGxlZnQueCAqIHJpZ2h0LnggKyBsZWZ0LnkgKiByaWdodC55ICsgbGVmdC56ICogcmlnaHQueiArIGxlZnQudyAqIHJpZ2h0Lnc7XG4gICAgICAgIGxldCBmbGFnID0gZmFsc2U7XG4gICAgICAgIGlmIChudW00IDwgMCkge1xuICAgICAgICAgICAgZmxhZyA9IHRydWU7XG4gICAgICAgICAgICBudW00ID0gLW51bTQ7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG51bTQgPiAwLjk5OTk5OSkge1xuICAgICAgICAgICAgbnVtMyA9IDEgLSBhbW91bnQ7XG4gICAgICAgICAgICBudW0yID0gZmxhZyA/IC1hbW91bnQgOiBhbW91bnQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjb25zdCBudW01ID0gTWF0aC5hY29zKG51bTQpO1xuICAgICAgICAgICAgY29uc3QgbnVtNiA9IDEuMCAvIE1hdGguc2luKG51bTUpO1xuICAgICAgICAgICAgbnVtMyA9IE1hdGguc2luKCgxLjAgLSBhbW91bnQpICogbnVtNSkgKiBudW02O1xuICAgICAgICAgICAgbnVtMiA9IGZsYWdcbiAgICAgICAgICAgICAgICA/IC1NYXRoLnNpbihhbW91bnQgKiBudW01KSAqIG51bTZcbiAgICAgICAgICAgICAgICA6IE1hdGguc2luKGFtb3VudCAqIG51bTUpICogbnVtNjtcbiAgICAgICAgfVxuICAgICAgICByZXN1bHQueCA9IG51bTMgKiBsZWZ0LnggKyBudW0yICogcmlnaHQueDtcbiAgICAgICAgcmVzdWx0LnkgPSBudW0zICogbGVmdC55ICsgbnVtMiAqIHJpZ2h0Lnk7XG4gICAgICAgIHJlc3Vs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YWwgY29kZSBhcyBhIHN0cmluZ1xuICAgICAqIEByZXR1cm5zIGEgc3RyaW5nIGNvbnRhaW5pbmcgdGhlIGhleGFkZWNpbWFsIHJlcHJlc2VudGF0aW9uIG9mIHRoZSBDb2xvcjQgb2JqZWN0XG4gICAgICovXG4gICAgZnVuY3Rpb24gdG9IZXhTdHJpbmcodmFsdWUpIHtcbiAgICAgICAgY29uc3QgaW50UiA9ICh2YWx1ZS5yICogMjU1KSB8IDA7XG4gICAgICAgIGNvbnN0IGludEcgPSAodmFsdWUuZyAqIDI1NSkgfCAwO1xuICAgICAgICBjb25zdCBpbnRCID0gKHZhbHVlLmIgKiAyNTUpIHwgMDtcbiAgICAgICAgY29uc3QgaW50QSA9ICh2YWx1ZS5hICogMjU1KSB8IDA7XG4gICAgICAgIHJldHVybiAoJyMnICtcbiAgICAgICAgICAgIFNjYWxhci50b0hleChpbnRSKSArXG4gICAgICAgICAgICBTY2FsYXIudG9IZXgoaW50RykgK1xuICAgICAgICAgICAgU2NhbGFyLnRvSGV4KGludEIpICtcbiAgICAgICAgICAgIFNjYWxhci50b0hleChpbnRBKSk7XG4gICAgfVxuICAgIENvbG9yNC50b0hleFN0cmluZyA9IHRvSGV4U3RyaW5nO1xuICAgIC8qKlxuICAgICAqIENvbXB1dGVzIGEgQ29sb3I0IGNvbnZlcnRlZCBmcm9tIHRoZSBjdXJyZW50IG9uZSB0byBsaW5lYXIgc3BhY2VcbiAgICAgKiBAcmV0dXJucyBjcmVhdGUgbXV0YWJsZSBDb2xvcjRcbiAgICAgKi9cbiAgICBmdW5jdGlvbiB0b0xpbmVhclNwYWNlKHZhbHVlKSB7XG4gICAgICAgIGNvbnN0IGNvbnZlcnRlZENvbG9yID0gY3JlYXRlKCk7XG4gICAgICAgIHRvTGluZWFyU3BhY2VUb1JlZih2YWx1ZSwgY29udmVydGVkQ29sb3IpO1xuICAgICAgICByZXR1cm4gY29udmVydGVkQ29sb3I7XG4gICAgfVxuICAgIENvbG9yNC50b0x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RGVncmVlcygwLCAxODAsIDApXG4gIH0pXG5cblxuXG4gIEFuaW1hdG9yLmNyZWF0ZShib2FyZE1vZGVsLCB7XG4gICAgc3RhdGVzOiBbXG4gICAgICB7XG4gICAgICAgIGNsaXA6ICdTdGF0ZTAnLFxuICAgICAgICBwbGF5aW5nOiB0cnVlLFxuICAgICAgICBsb29wOiBmYWxzZVxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgY2xpcDogJ1N0YXRlMScsXG4gICAgICAgIHBsYXlpbmc6IGZhbHNlLFxuICAgICAgICBsb29wOiBmYWxzZVxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgY2xpcDogJ1N0YXRlMicsXG4gICAgICAgIHBsYXlpbmc6IGZhbHNlLFxuICAgICAgICBsb29wOiBmYWxzZVxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgY2xpcDogJ1N0YXRlMycsXG4gICAgICAgIHBsYXlpbmc6IGZhbHNlLFxuICAgICAgICBsb29wOiBmYWxzZVxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgY2xpcDogJ1N0YXRlNCcsXG4gICAgICAgIHBsYXlpbmc6IGZhbHNlLFxuICAgICAgICBsb29wOiBmYWxzZVxuICAgICAgfSxcbiAgICAgIHtcbiAgICAgICAgY2xpcDogJ1N0YXRlNScsXG4gICAgICAgIHBsYXlpbmc6IGZhbHNlLFxuICAgICAgICBsb29wOiBmYWxzZVxuICAgICAgfSxcbiAgICBdXG4gIH0pXG5cblxuICBwb2ludGVyRXZlbnRzU3lzdGVtLm9uUG9pbnRlckRvd24oXG4gICAge1xuICAgICAgZW50aXR5OiBib2FyZE1vZGVsLFxuICAgICAgb3B0czogeyBidXR0b246IElucHV0QWN0aW9uLklBX1BSSU1BUlksIGhvdmVyVGV4dDogJ1B1dCcsIG1heERpc3RhbmNlOiA1LCB9LFxuICAgIH0sXG4gICAgZnVuY3Rpb24gKCkge1xuICAgICAgY3V0U3VzaGkoQ3V0dGVyUGFyZW50LCBib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SBlbnRpdHlFdmVudC5nZXQocG9pbnRlckV2ZW50KTtcbiAgICAgICAgICAgIGVudGl0eUV2ZW50LnNldChwb2ludGVyRXZlbnQsIHVwZGF0ZS5wcm9wcyk7XG4gICAgICAgICAgICBpZiAoYWxyZWFkeUhhc1BvaW50ZXJFdmVudClcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBjb25zdCBwb2ludGVyRXZlbnRTeXN0ZW0gPSB1cGRhdGUuY29tcG9uZW50ID09PSAnb25Nb3VzZURvd24nID8gcG9pbnRlckV2ZW50cy5vblBvaW50ZXJEb3duIDogcG9pbnRlckV2ZW50cy5vblBvaW50ZXJVcDtcbiAgICAgICAgICAgIHBvaW50ZXJFdmVudFN5c3RlbShpbnN0YW5jZS5lbnRpdHksICgpID0+IHBvaW50ZXJFdmVudENhbGxiYWNrKGluc3RhbmNlLmVudGl0eSwgcG9pbnRlckV2ZW50KSwge1xuICAgICAgICAgICAgICAgIGJ1dHRvbjogMCAvKiBJbnB1dEFjdGlvbi5JQV9QT0lOVEVSICovLFxuICAgICAgICAgICAgICAgIC8vIFdlIGFkZCB0aGlzIHNob3dGZWVkQmFjayBzbyB0aGUgcG9pbnRlckV2ZW50U3lzdGVtIGNyZWF0ZXMgYSBQb2ludGVyRXZlbnQgY29tcG9uZW50IHdpdGggb3VyIGVudGl0eVxuICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgbmVlZGVkIGZvciB0aGUgcmVuZGVyZXIgdG8ga25vdyB3aGljaCBlbnRpdGllcyBhcmUgY2xpY2tlYWJsZXNcbiAgICAgICAgICAgICAgICBzaG93RmVlZGJhY2s6IHRydWVcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZUNvbXBvbmVudChpbnN0YW5jZSwgY29tcG9uZW50KSB7XG4gICAgICAgIGNvbnN0IGNvbXBvbmVudElkID0gZ2V0Q29tcG9uZW50SWRbY29tcG9uZW50XTt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GF0ZT8uaXNTdWJtaXQ7XG4gICAgICAgIGV2ZW50LnNldChjb21wb25lbnRJZCwgeyBvbkNoYW5nZUNhbGxiYWNrLCBvblN1Ym1pdENhbGxiYWNrLCB2YWx1ZSwgaXNTdWJtaXQgfSk7XG4gICAgfVxuICAgIGNvbnN0IGhvc3RDb25maWcgPSB7XG4gICAgICAgIC4uLm5vb3BDb25maWcsXG4gICAgICAgIGNyZWF0ZUluc3RhbmNlKHR5cGUsIHByb3BzKSB7XG4gICAgICAgICAgICBjb25zdCBlbnRpdHkgPSBlbmdpbmUuYWRkRW50aXR5KCk7XG4gICAgICAgICAgICBlbnRpdGllcy5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgIGNvbnN0IGluc3RhbmNlID0ge1xuICAgICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgICBfY2hpbGQ6IFtdLFxuICAgICAgICAgICAgICAgIHBhcmVudDogQ0FOVkFTX1JPT1RfRU5USVRZLFxuICAgICAgICAgICAgICAgIHJpZ2h0T2Y6IHVuZGVmaW5lZFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIHByb3BzKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qga2V5VHlwZWQgPSBrZXk7XG4gICAgICAgICAgICAgICAgaWYgKGtleVR5cGVkID09PSAnY2hpbGRyZW4nIHx8IGtleVR5cGVkID09PSAna2V5Jykge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGlzTGlzdGVuZXIoa2V5VHlwZWQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHVwc2VydExpc3RlbmVyKGluc3RhbmNlLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnYWRkJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BzOiBwcm9wc1trZXlUeXBlZF0sXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQ6IGtleVR5cGVkXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdXBzZXJ0Q29tcG9uZW50KGluc3RhbmNlLCBwcm9wc1trZXlUeXBlZF0sIGtleVR5cGVkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gaW5zdGFuY2U7XG4gICAgICAgIH0sXG4gICAgICAgIGFwcGVuZENoaWxkLFxuICAgICAgICBhcHBlbmRDaGlsZFRvQ29udGFpbmVyOiBhcHBlbmRDaGlsZCxcbiAgICAgICAgYXBwZW5kSW5pdGlhbENoaWxkOiBhcHBlbmRDaGlsZCxcbiAgICAgICAgcmVtb3ZlQ2hpbGQ6IHJlbW92ZUNoaWxkLFxuICAgICAgICBwcmVwYXJlVXBkYXRlKF9pbnN0YW5jZSwgX3R5cGUsIG9sZFByb3BzLCBuZXdQcm9wcykge1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudEtleXNcbiAgICAgICAgICAgICAgICAubWFwKChjb21wb25lbnQpID0+IHByb3BzQ2hhbmdlZChjb21wb25lbnQsIG9sZFByb3BzW2NvbXBvbmVudF0sIG5ld1Byb3BzW2NvbXBvbmVudF0pKVxuICAgICAgICAgICAgICAgIC5maWx0ZXIoaXNOb3RVbmRlZmluZWQpO1xuICAgICAgICB9LFxuICAgICAgICBjb21taXRVcGRhdGUoaW5zdGFuY2UsIHVwZGF0ZVBheWxvYWQsIF90eXBlLCBfcHJldlByb3BzLCBfbmV4dFByb3BzLCBfaW50ZXJuYWxIYW5kbGUpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgdXBkYXRlIG9mIHVwZGF0ZVBheWxvYWQpIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNMaXN0ZW5lcih1cGRhdGUuY29tcG9uZW50KSkge1xuICAgICAgICAgICAgICAgICAgICB1cHNlcnRMaXN0ZW5lcihpbnN0YW5jZSwgdXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh1cGRhdGUudHlwZSA9PT0gJ2RlbGV0ZScpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVtb3ZlQ29tcG9uZW50KGluc3RhbmNlLCB1cGRhdGUuY29tcG9uZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodXBkYXRlLnByb3BzKSB7XG4gICAgICAgICAgICAgICAgICAgIHVwc2VydENvbXBvbmVudChpbnN0YW5jZSwgdXBkYXRlLnByb3BzLCB1cGRhdGUuY29tcG9uZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGluc2VydEJlZm9yZShwYXJlbnRJbnN0YW5jZSwgY2hpbGQsIGJlZm9yZUNoaWxkKSB7XG4gICAgICAgICAgICBjb25zdCBiZWZvcmVDaGlsZEluZGV4ID0gcGFyZW50SW5zdGFuY2UuX2NoaWxkLmZpbmRJbmRleCgoYykgPT4gYy5lbnRpdHkgPT09IGJlZm9yZUNoaWxkLmVudGl0eSk7XG4gICAgICAgICAgICBwYXJlbnRJbnN0YW5jZS5fY2hpbGQgPSBbXG4gICAgICAgICAgICAgICAgLi4ucGFyZW50SW5zdGFuY2UuX2NoaWxkLnNsaWNlKDAsIGJlZm9yZUNoaWxkSW5kZXgpLFxuICAgICAgICAgICAgICAgIGNoaWxkLFxuICAgICAgICAgICAgICAgIC4uLnBhcmVudEluc3RhbmNlLl9jaGlsZC5zbGljZShiZWZvcmVDaGlsZEluZGV4KVxuICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIGNoaWxkLnJpZ2h0T2YgPSBiZWZvcmVDaGlsZC5yaWdodE9mO1xuICAgICAgICAgICAgYmVmb3JlQ2hpbGQucmln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AgICAgICAgICAgY29uc3QgZW50aXR5U3RhdGUgPSBjaGFuZ2VFdmVudHMuZ2V0KGVudGl0eSk/LmdldChjb21wb25lbnRJZCk7XG4gICAgICAgICAgICBjb25zdCBpc1N1Ym1pdCA9ICEhUmVzdWx0LmlzU3VibWl0O1xuICAgICAgICAgICAgaWYgKGVudGl0eVN0YXRlPy5vbkNoYW5nZUNhbGxiYWNrICYmIFJlc3VsdC52YWx1ZSAhPT0gZW50aXR5U3RhdGUudmFsdWUpIHtcbiAgICAgICAgICAgICAgICBlbnRpdHlTdGF0ZS5vbkNoYW5nZUNhbGxiYWNrKFJlc3VsdC52YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZW50aXR5U3RhdGU/Lm9uU3VibWl0Q2FsbGJhY2sgJiYgaXNTdWJtaXQgJiYgIWVudGl0eVN0YXRlLmlzU3VibWl0KSB7XG4gICAgICAgICAgICAgICAgZW50aXR5U3RhdGUub25TdWJtaXRDYWxsYmFjayhSZXN1bHQudmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdXBkYXRlT25DaGFuZ2UoZW50aXR5LCBjb21wb25lbnRJZCwge1xuICAgICAgICAgICAgICAgIG9uQ2hhbmdlQ2FsbGJhY2s6IGVudGl0eVN0YXRlPy5vbkNoYW5nZUNhbGxiYWNrLFxuICAgICAgICAgICAgICAgIG9uU3VibWl0Q2FsbGJhY2s6IGVudGl0eVN0YXRlPy5vblN1Ym1pdENhbGxiYWNrLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBSZXN1bHQudmFsdWUsXG4gICAgICAgICAgICAgICAgaXNTdWJtaXRcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiB7XG4gICAgICAgIHVwZGF0ZTogZnVuY3Rpb24gKGNvbXBvbmVudCkge1xuICAgICAgICAgICAgaWYgKGNoYW5nZUV2ZW50cy5zaXplKSB7XG4gICAgICAgICAgICAgICAgaGFuZG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AgICAgICAgLi4ucHJvcHMudWlUZXh0LFxuICAgICAgICAgICAgLi4uZ2V0Rm9udChwcm9wcy51aVRleHQuZm9udCksXG4gICAgICAgICAgICAuLi5nZXRUZXh0QWxpZ24ocHJvcHMudWlUZXh0LnRleHRBbGlnbilcbiAgICAgICAgfVxuICAgIH07XG4gICAgcmV0dXJuIFJlYWN0RWNzLmNyZWF0ZUVsZW1lbnQoXCJlbnRpdHlcIiwgeyAuLi5wYXJzZVByb3BzKHByb3BzKSwgLi4udWlUZXh0IH0pO1xufVxuIiwgImltcG9ydCB7IGlzTGlzdGVuZXIgfSBmcm9tICcuLi9jb21wb25lbnRzJztcbmV4cG9ydCBmdW5jdGlvbiBwcm9wc0NoYW5nZWQoY29tcG9uZW50LCBwcmV2UHJvcHMsIG5leHRQcm9wcykge1xuICAgIGlmIChwcmV2UHJvcHMgJiYgIW5leHRQcm9wcykge1xuICAgICAgICByZXR1cm4geyB0eXBlOiAnZGVsZXRlJywgY29tcG9uZW50IH07XG4gICAgfVxuICAgIGlmICghbmV4dFByb3BzKSB7XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKCFwcmV2UHJvcHMgJiYgbmV4dFByb3BzKSB7XG4gICAgICAgIHJldHVybiB7IHR5cGU6ICdhZGQnLCBwcm9wczogbmV4dFByb3BzLCBjb21wb25lbnQgfTtcbiAgICB9XG4gICAgaWYgKGlzTGlzdGVuZXIoY29tcG9uZW50KSkge1xuICAgICAgICBpZiAoIWlzRXF1YWwocHJldlByb3BzLCBuZXh0UHJvcHMpKSB7XG4gICAgICAgICAgICByZXR1cm4geyB0eXBlOiAncHV0JywgY29tcG9uZW50LCBwcm9wczogbmV4dFByb3BzIH07XG4gICAgICAgIH1cbiAgICB9XG4gICAgY29uc3QgY2hhbmdlcyA9IHt9O1xuICAgIGZvciAoY29uc3QgayBpbiBwcmV2UHJvcHMpIHtcbiAgICAgICAgY29uc3QgcHJvcEtleSA9IGs7XG4gICAgICAgIGlmICghaXNF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gIGNvbmRpdGlvbnM6IFNjaGVtYXMuT3B0aW9uYWwoXG4gICAgICAgICAgU2NoZW1hcy5BcnJheShcbiAgICAgICAgICAgIFNjaGVtYXMuTWFwKHtcbiAgICAgICAgICAgICAgaWQ6IFNjaGVtYXMuT3B0aW9uYWwoU2NoZW1hcy5JbnQpLFxuICAgICAgICAgICAgICB0eXBlOiBTY2hlbWFzLkVudW1TdHJpbmc8VHJpZ2dlckNvbmRpdGlvblR5cGU+KFxuICAgICAgICAgICAgICAgIFRyaWdnZXJDb25kaXRpb25UeXBlLFxuICAgICAgICAgICAgICAgIFRyaWdnZXJDb25kaXRpb25UeXBlLldIRU5fU1RBVEVfSVMsXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIHZhbHVlOiBTY2hlbWFzLlN0cmluZyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICksXG4gICAgICAgICksXG4gICAgICAgIG9wZXJhdGlvbjogU2NoZW1hcy5PcHRpb25hbChcbiAgICAgICAgICBTY2hlbWFzLkVudW1TdHJpbmc8VHJpZ2dlckNvbmRpdGlvbk9wZXJhdGlvbj4oXG4gICAgICAgICAgICBUcmlnZ2VyQ29uZGl0aW9uT3BlcmF0aW9uLFxuICAgICAgICAgICAgVHJpZ2dlckNvbmRpdGlvbk9wZXJhdGlvbi5BTkQsXG4gICAgICAgICAgKSxcbiAgICAgICAgKSxcbiAgICAgICAgYWN0aW9uczogU2NoZW1hcy5BcnJheShcbiAgICAgICAgICBTY2hlbWFzLk1hcCh7XG4gICAgICAgICAgICBpZDogU2NoZW1hcy5PcHRpb25hbChTY2hlbWFzLkludCksXG4gICAgICAgICAgICBuYW1lOiBTY2hlbWFzLk9wdGlvbmFsKFNjaGVtYXMuU3RyaW5nKSxcbiAgICAgICAgICB9KSxcbiAgICAgICAgKSxcbiAgICAgIH0pLFxuICAgICksXG4gIH0pXG5cbiAgY29uc3QgU3RhdGVzID0gZW5naW5lLmRlZmluZUNvbXBvbmVudChDb21wb25l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dpdGNoICh0eXBlKSB7XG4gICAgICAgIGNhc2UgQWN0aW9uVHlwZS5QTEFZX0FOSU1BVElPTjoge1xuICAgICAgICAgIGluaXRQbGF5QW5pbWF0aW9uKGVudGl0eSlcbiAgICAgICAgICBicmVha1xuICAgICAgICB9XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgYnJlYWtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBiaW5kIGFjdGlvbnNcbiAgICBjb25zdCBhY3Rpb25FdmVudHMgPSBnZXRBY3Rpb25FdmVudHMoZW50aXR5KVxuICAgIGZvciAoY29uc3QgYWN0aW9uIG9mIGFjdGlvbnMudmFsdWUpIHtcbiAgICAgIGFjdGlvbkV2ZW50cy5vbihhY3Rpb24ubmFtZSwgKCkgPT4ge1xuICAgICAgICBzd2l0Y2ggKGFjdGlvbi50eXBlKSB7XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfQU5JTUFUSU9OOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5QW5pbWF0aW9uKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5QTEFZX0FOSU1BVElPTj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX0FOSU1BVElPTjoge1xuICAgICAgICAgICAgaGFuZGxlU3RvcEFuaW1hdGlvbihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9BTklNQVRJT04+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0VUX1NUQVRFOiB7XG4gICAgICAgICAgICBoYW5kbGVTZXRTdGF0ZShlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TRVRfU1RBVEU+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RBUlRfVFdFRU46IHtcbiAgICAgICAgICAgIGhhbmRsZVN0YXJ0VHdlZW4oZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RBUlRfVFdFRU4+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0VUX0NPVU5URVI6IHtcbiAgICAgICAgICAgIGhhbmRsZVNldENvdW50ZXIoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU0VUX0NPVU5URVI+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuSU5DUkVNRU5UX0NPVU5URVI6IHtcbiAgICAgICAgICAgIGhhbmRsZUluY3JlbWVudENvdW50ZXIoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLklOQ1JFTUVOVF9DT1VOVEVSPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLkRFQ1JFQVNFX0NPVU5URVI6IHtcbiAgICAgICAgICAgIGhhbmRsZURlY3JlYXNlQ291bnRlcihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuREVDUkVBU0VfQ09VTlRFUj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5QTEFZX1NPVU5EOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5U291bmQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9TT1VORD4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX1NPVU5EOiB7XG4gICAgICAgICAgICBoYW5kbGVTdG9wU291bmQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9TT1VORD4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TRVRfVklTSUJJTElUWToge1xuICAgICAgICAgICAgaGFuZGxlU2V0VmlzaWJpbGl0eShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU0VUX1ZJU0lCSUxJVFk+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuQVRUQUNIX1RPX1BMQVlFUjoge1xuICAgICAgICAgICAgaGFuZGxlQXR0YWNoVG9QbGF5ZXIoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLkFUVEFDSF9UT19QTEFZRVI+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuREVUQUNIX0ZST01fUExBWUVSOiB7XG4gICAgICAgICAgICBoYW5kbGVEZXRhY2hGcm9tUGxheWVyKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5ERVRBQ0hfRlJPTV9QTEFZRVI+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9WSURFT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVBsYXlWaWRlbyhcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9WSURFT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9WSURFT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BWaWRlbyhcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9WSURFT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9BVURJT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVBsYXlBdWRpb1N0cmVhbShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9BVURJT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9BVURJT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BBdWRpb1N0cmVhbShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9BVURJT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuVEVMRVBPUlRfUExBWUVSOiB7XG4gICAgICAgICAgICBoYW5kbGVUZWxlcG9ydFBsYXllcihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuVEVMRVBPUlRfUExBWUVSPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLk1PVkVfUExBWUVSOiB7XG4gICAgICAgICAgICBoYW5kbGVNb3ZlUGxheWVyKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLk1PVkVfUExBWUVSPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfREVGQVVMVF9FTU9URToge1xuICAgICAgICAgICAgaGFuZGxlUGxheURlZmF1bHRFbW90ZShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9ERUZBVUxUX0VNT1RFPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfQ1VTVE9NX0VNT1RFOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5Q3VzdG9tRW1vdGUoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlBMQVlfQ1VTVE9NX0VNT1RFPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLk9QRU5fTElOSzoge1xuICAgICAgICAgICAgaGFuZGxlT3BlbkxpbmsoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuT1BFTl9MSU5LPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNIT1dfVEVYVDoge1xuICAgICAgICAgICAgaGFuZGxlU2hvd1RleHQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU0hPV19URVhUPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLkhJREVfVEVYVDoge1xuICAgICAgICAgICAgaGFuZGxlSGlkZVRleHQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuSElERV9URVhUPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUQVJUX0RFTEFZOiB7XG4gICAgICAgICAgICBoYW5kbGVTdGFydERlbGF5KGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUQVJUX0RFTEFZPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUT1BfREVMQVk6IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BEZWxheShlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX0RFTEFZPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUQVJUX0xPT1A6IHtcbiAgICAgICAgICAgIGhhbmRsZVN0YXJ0TG9vcChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVEFSVF9MT09QPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUT1BfTE9PUDoge1xuICAgICAgICAgICAgaGFuZGxlU3RvcExvb3AoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9MT09QPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLkNMT05FX0VOVElUWToge1xuICAgICAgICAgICAgaGFuZGxlQ2xvbmVFbnRpdHkoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLkNMT05FX0VOVElUWT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5SRU1PVkVfRU5USVRZOiB7XG4gICAgICAgICAgICBoYW5kbGVSZW1vdmVFbnRpdHkoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlJFTU9WRV9FTlRJVFk+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0hPV19JTUFHRToge1xuICAgICAgICAgICAgaGFuZGxlU2hvd0ltYWdlKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNIT1dfSU1BR0U+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuSElERV9JTUFHRToge1xuICAgICAgICAgICAgaGFuZGxlSGlkZUltYWdlKGVudGl0eSwgZ2V0UGF5bG9hZD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dnZXJBY3Rpb24pKSB7XG4gICAgICAgICAgICAgIGNvbnN0IGVudGl0eSA9IGdldEVudGl0eUJ5QWN0aW9uKHRyaWdnZXJBY3Rpb24pXG4gICAgICAgICAgICAgIGlmIChlbnRpdHkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBhY3Rpb25zID0gQWN0aW9ucy5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb25zKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBhY3Rpb24gPSBhY3Rpb25zLnZhbHVlLmZpbmQoXG4gICAgICAgICAgICAgICAgICAgICgkKSA9PiAkLm5hbWUgPT09IHRyaWdnZXJBY3Rpb24ubmFtZSxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIGlmIChhY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gYWN0aW9ucyBhcmUgZW5xdWV1ZWQgdG8gYmUgZXhlY3V0ZWQgb24gdGhlIG5leHQgdGljayBhZnRlciBhbGwgdGhlIHRyaWdnZXJzIGhhdmUgYmVlbiBwcm9jZXNzZWQsXG4gICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgaXMgdG8gYXZvaWQgb25lIHRyaWdnZXIgbWVzc2luZyB3aXRoIG90aGVyIHRyaWdnZXIncyBjb25kaXRpb25zXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvblF1ZXVlLnB1c2goeyBlbnRpdHksIGFjdGlvbiB9KVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSlcbiAgICB9XG4gICAgdHJpZ2dlckV2ZW50cy5lbWl0KFRyaWdnZXJUeXBlLk9OX1NQQVdOKVxuXG4gICAgaW5pdGVkRW50aXRpZXMuYWRkKGVudGl0eSlcbiAgfVxuXG4gIGZ1bmN0aW9uIGlzVmF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gZW50aXR5ID0gZ2V0RW50aXR5QnlDb25kaXRpb24oY29uZGl0aW9uKVxuICAgIGlmIChlbnRpdHkpIHtcbiAgICAgIHRyeSB7XG4gICAgICAgIHN3aXRjaCAoY29uZGl0aW9uLnR5cGUpIHtcbiAgICAgICAgICBjYXNlIFRyaWdnZXJDb25kaXRpb25UeXBlLldIRU5fU1RBVEVfSVM6IHtcbiAgICAgICAgICAgIGNvbnN0IHN0YXRlcyA9IFN0YXRlcy5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKHN0YXRlcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb25zdCBjdXJyZW50VmFsdWUgPSBnZXRDdXJyZW50VmFsdWUoc3RhdGVzKVxuICAgICAgICAgICAgICByZXR1cm4gY3VycmVudFZhbHVlID09PSBjb25kaXRpb24udmFsdWVcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgVHJpZ2dlckNvbmRpdGlvblR5cGUuV0hFTl9TVEFURV9JU19OT1Q6IHtcbiAgICAgICAgICAgIGNvbnN0IHN0YXRlcyA9IFN0YXRlcy5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKHN0YXRlcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb25zdCBjdXJyZW50VmFsdWUgPSBnZXRDdXJyZW50VmFsdWUoc3RhdGVzKVxuICAgICAgICAgICAgICByZXR1cm4gY3VycmVudFZhbHVlICE9PSBjb25kaXRpb24udmFsdWVcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgVHJpZ2dlckNvbmRpdGlvblR5cGUuV0hFTl9DT1VOVEVSX0VRVUFMUzoge1xuICAgICAgICAgICAgY29uc3QgY291bnRlciA9IENvdW50ZXIuZ2V0T3JOdWxsKGVudGl0eSlcbiAgICAgICAgICAgIGlmIChjb3VudGVyICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIGNvbnN0IG51bWVyaWMgPSBOdW1iZXIoY29uZGl0aW9uLnZhbHVlKVxuICAgICAgICAgICAgICBpZiAoIWlzTmFOKG51bWVyaWMpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvdW50ZXIudmFsdWUgPT09IG51bWVyaWNcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBUcmlnZ2VyQ29uZGl0aW9uVHlwZS5XSEVOX0NPVU5URVJfSVNfR1JFQVRFUl9USEFOOiB7XG4gICAgICAgICAgICBjb25zdCBjb3VudGVyID0gQ291bnRlci5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKGNvdW50ZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgY29uc3QgbnVtZXJpYyA9IE51bWJlcihjb25kaXRpb24udmFsdWUpXG4gICAgICAgICAgICAgIGlmICghaXNOYU4obnVtZXJpYykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY291bnRlci52YWx1ZSA+IG51bWVyaWNcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBUcmlnZ2VyQ29uZGl0aW9uVHlwZS5XSEVOX0NPVU5URVJfSVNfTEVTU19USEFOOiB7XG4gICAgICAgICAgICBjb25zdCBjb3VudGVyID0gQ291bnRlci5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKGNvdW50ZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgY29uc3QgbnVtZXJpYyA9IE51bWJlcihjb25kaXRpb24udmFsdWUpXG4gICAgICAgICAgICAgIGlmICghaXNOYU4obnVtZXJpYykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY291bnRlci52YWx1ZSA8IG51b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uICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gbnVsbFxuICB9XG5cbiAgZnVuY3Rpb24gZ2V0RW50aXR5QnlDb25kaXRpb24oY29uZGl0aW9uOiBUcmlnZ2VyQ29uZGl0aW9uKSB7XG4gICAgY29uc3QgY29tcG9uZW50TmFtZSA9IE9iamVjdC52YWx1ZXMoQ29tcG9uZW50TmFtZSlcbiAgICAgIC5tYXAoKGNvbXBvbmVudE5hbWUpID0+ICh7XG4gICAgICAgIGNvbXBvbmVudE5hbWUsXG4gICAgICAgIGNvbmRpdGlvblR5cGVzOiBnZXRDb25kaXRpb25UeXBlc0J5Q29tcG9uZW50TmFtZShjb21wb25lbnROYW1lKSxcbiAgICAgIH0pKVxuICAgICAgLnJlZHVjZTxDb21wb25lbnROYW1lIHwgbnVsbD4oXG4gICAgICAgIChyZXN1bHQsIHsgY29tcG9uZW50TmFtZSwgY29uZGl0aW9uVHlwZXMgfSkgPT5cbiAgICAgICAgICBjb25kaXRpb25UeXBlcy5pbmNsdWRlcyhjb25kaXRpb24udHlwZSkgPyBjb21wb25lbnROYW1lIDogcmVzdWx0LFxuICAgICAgICBudWxsLFxuICAgICAgKVxuICAgIGlmIChjb21wb25lbnROYW1lICYmIGNvbmRpdGlvbi5pZCkge1xuICAgICAgY29uc3QgZW50aXR5ID0gZ2V0RW50aXR5QnlJZChjb21wb25lbnROYW1lLCBjb25kaXRpb24uaWQpXG4gICAgICBpZiAoZW50aXR5KSB7XG4gICAgICAgIHJldHVybiBlbnRpdHlcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG51bGxcbiAgfVxuXG4gIC8vIE9OX0NMSUNLXG4gIGZ1bmN0aW9uIGluaXRPbkNsaWNrVHJpZ2dlcihlbnRpdHk6IEVudGl0eSkge1xuICAgIHBvaW50ZXJFdmVudHNTeXN0ZW0ub25Qb2ludGVyRG93bihcbiAgICAgIHtcbiAgICAgICAgZW50aXR5LFxuICAgICAgICBvcHRzOiB7XG4gICAgICAgICA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W1zW29mZnNldF0gPSBmdW5jdGlvbiBjYWxsYmFjayhlcnIvKiwgdmFyYXJncyAqLykge1xyXG4gICAgICAgICAgICBpZiAocGVuZGluZykge1xyXG4gICAgICAgICAgICAgICAgcGVuZGluZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgaWYgKGVycilcclxuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTtcclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJhbXMgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCAtIDEpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChvZmZzZXQgPCBwYXJhbXMubGVuZ3RoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXNbb2Zmc2V0KytdID0gYXJndW1lbnRzW29mZnNldF07XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZS5hcHBseShudWxsLCBwYXJhbXMpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBmbi5hcHBseShjdHggfHwgbnVsbCwgcGFyYW1zKTtcclxuICAgICAgICB9IGNhdGNoIChlcnIpIHtcclxuICAgICAgICAgICAgaWYgKHBlbmRpbmcpIHtcclxuICAgICAgICAgICAgICAgIHBlbmRpbmcgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIHJlamVjdChlcnIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbn1cclxuIiwgIlwidXNlIHN0cmljdFwiO1xyXG5cclxuLyoqXHJcbiAqIEEgbWluaW1hbCBiYXNlNjQgaW1wbGVtZW50YXRpb24gZm9yIG51bWJlciBhcnJheXMuXHJcbiAqIEBtZW1iZXJvZiB1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5cclxuICogQHBhcmFtIHtVaW50OEFycmF5fSBidWZmZXIgU291cmNlIGJ1ZmZlclxyXG4gKiBAcGFyYW0ge251bWJlcn0gc3RhcnQgU291cmNlIHN0YXJ0XHJcbiAqIEBwYXJhbSB7bnVtYmVyfSBlbmQgU291cmNlIGVuZFxyXG4gKiBAcmV0dXJucyB7c3RyaW5nfSBCYXNlNjQgZW5jb2RlZCBzdHJpbmdcclxuICovXHJcbmJhc2U2NC5lbmNvZGUgPSBmdW5jdGlvbiBlbmNvZGUoYnVmZmVyLCBzdGFydCwgZW5kKSB7XHJcbiAgICB2YXIgcGFydHMgPSBudWxsLFxyXG4gICAgICAgIGNodW5rID0gW107XHJcbiAgICB2YXIgaSA9IDAsIC8vIG91dHB1dCBpbmRleFxyXG4gICAgICAgIGogPSAwLCAvLyBnb3RvIGluZGV4XHJcbiAgICAgICAgdDsgICAgIC8vIHRlbXBvcmFyeVxyXG4gICAgd2hpbGUgKHN0YXJ0IDwgZW5kKSB7XHJcbiAgICAgICAgdmFyIGIgPSBidWZmZXJbc3RhcnQrK107XHJcbiAgICAgICAgc3dpdGNoIChqKSB7XHJcbiAgICAgICAgICAgIGNhc2UgMDpcclxuICAgICAgICAgICAgICAgIGNodW5rW2krK10gPSBiNjRbYiA+PiAyXTtcclxuICAgICAgICAgICAgICAgIHQgPSAoYiAmIDMpIDw8IDQ7XHJcbiAgICAgICAgICAgICAgICBqID0gMTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDE6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDRdO1xyXG4gICAgICAgICAgICAgICAgdCA9IChiICYgMTUpIDw8IDI7XHJcbiAgICAgICAgICAgICAgICBqID0gMjtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDI6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDZdO1xyXG4gICAgICAgICAgICAgICAgY2h1bmtbaSsrXSA9IGI2NFtiICYgNjNdO1xyXG4gICAgICAgICAgICAgICAgaiA9IDA7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGkgPiA4MTkxKSB7XHJcbiAgICAgICAgICAgIChwYXJ0cyB8fCAocGFydHMgPSBbXSkpLnB1c2goU3RyaW5nLmZyb21DaGFyQ29kZS5hcHBseShTdHJpbmcsIGNodW5rKSk7XHJcbiAgICAgICAgICAgIGkgPSAwO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIGlmIChqKSB7XHJcbiAgICAgICAgY2h1bmtbaSsrXSA9IGI2NFt0XTtcclxuICAgICAgICBjaHVua1tpKytdID0gNjE7XHJcbiAgICAgICAgaWYgKGogPT09IDEpXHJcbiAgICAgICAgICAgIGNodW5rW2krK10gPSA2MTtcclxuICAgIH1cclxuICAgIGlmIChwYXJ0cykge1xyXG4gICAgICAgIGlmIChpKVxyXG4gICAgICAgICAgICBwYXJ0cy5wdXNoKFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkoU3RyaW5nLCBjaHVuay5zbGljZSgwLCBpKSkpO1xyXG4gICAgICAgIHJldHVybiBwYXJ0cy5qb2luKFwiXCIpO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkoU3RyaW5nLCBjaHVuay5zbGljZSgwLCBpKSk7XHJcbn07XHJcblxyXG52YXIgaW52YWxpZEVuY29kaW5nID0gXCJpbnZhbGlkIGVuY29kaW5nXCI7XHJcblxyXG4vKipcclxuICogRGVjb2RlcyBhIGJhc2U2NCBlbmNvZGVkIHN0cmluZyB0byBhIGJ1ZmZlci5cclxuICogQHBhcmFtIHtzdHJpbmd9IHN0cmluZyBTb3VyY2Ugc3RyaW5nXHJcbiAqIEBwYXJhbSB7VWludDhBcnJheX0gYnVmZmVyIERlc3RpbmF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YWwgKiBNYXRoLnBvdygyLCAtZXhwb25lbnQpICogODM4ODYwOCkgJiA4Mzg4NjA3O1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgZXhwb25lbnQgKyAxMjcgPDwgMjMgfCBtYW50aXNzYSkgPj4+IDAsIGJ1ZiwgcG9zKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZXhwb3J0cy53cml0ZUZsb2F0TEUgPSB3cml0ZUZsb2F0X2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRMRSk7XHJcbiAgICAgICAgZXhwb3J0cy53cml0ZUZsb2F0QkUgPSB3cml0ZUZsb2F0X2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRCRSk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlYWRGbG9hdF9pZWVlNzU0KHJlYWRVaW50LCBidWYsIHBvcykge1xyXG4gICAgICAgICAgICB2YXIgdWludCA9IHJlYWRVaW50KGJ1ZiwgcG9zKSxcclxuICAgICAgICAgICAgICAgIHNpZ24gPSAodWludCA+PiAzMSkgKiAyICsgMSxcclxuICAgICAgICAgICAgICAgIGV4cG9uZW50ID0gdWludCA+Pj4gMjMgJiAyNTUsXHJcbiAgICAgICAgICAgICAgICBtYW50aXNzYSA9IHVpbnQgJiA4Mzg4NjA3O1xyXG4gICAgICAgICAgICByZXR1cm4gZXhwb25lbnQgPT09IDI1NVxyXG4gICAgICAgICAgICAgICAgPyBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgPyBOYU5cclxuICAgICAgICAgICAgICAgIDogc2lnbiAqIEluZmluaXR5XHJcbiAgICAgICAgICAgICAgICA6IGV4cG9uZW50ID09PSAwIC8vIGRlbm9ybWFsXHJcbiAgICAgICAgICAgICAgICA/IHNpZ24gKiAxLjQwMTI5ODQ2NDMyNDgxN2UtNDUgKiBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgOiBzaWduICogTWF0aC5wb3coMiwgZXhwb25lbnQgLSAxNTApICogKG1hbnRpc3NhICsgODM4ODYwOCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdExFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludExFKTtcclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdEJFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludEJFKTtcclxuXHJcbiAgICB9KSgpO1xyXG5cclxuICAgIC8vIGRvdWJsZTogdHlwZWQgYXJyYXlcclxuICAgIGlmICh0eXBlb2YgRmxvYXQ2NEFycmF5ICE9PSBcInVuZGVmaW5lZFwiKSAoZnVuY3Rpb24oKSB7XHJcblxyXG4gICAgICAgIHZhciBmNjQgPSBuZXcgRmxvYXQ2NEFycmF5KFstMF0pLFxyXG4gICAgICAgICAgICBmOGIgPSBuZXcgVWludDhBcnJheShmNjQuYnVmZmVyKSxcclxuICAgICAgICAgICAgbGUgID0gZjhiWzddID09PSAxMjg7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHdyaXRlRG91YmxlX2Y2NF9jcHkodmFsLCBidWYsIHBvcykge1xyXG4gICAgICAgICAgICBmNjRbMF0gPSB2YWw7XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgICAgXSA9IGY4YlswXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDFdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMl0gPSBmOGJbMl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAzXSA9IGY4YlszXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDRdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNV0gPSBmOGJbNV07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA2XSA9IGY4Yls2XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDddID0gZjhiWzddO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gd3JpdGVEb3VibGVfZjY0X3Jldih2YWwsIGJ1ZiwgcG9zKSB7XHJcbiAgICAgICAgICAgIGY2NFswXSA9IHZhbDtcclxuICAgICAgICAgICAgYnVmW3BvcyAgICBdID0gZjhiWzddO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMV0gPSBmOGJbNl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAyXSA9IGY4Yls1XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDNdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNF0gPSBmOGJbM107XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA1XSA9IGY4YlsyXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDZdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgN10gPSBmOGJbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVMRSA9IGxlID8gd3JpdGVEb3VibGVfZjY0X2NweSA6IHdyaXRlRG91YmxlX2Y2NF9yZXY7XHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlQkUgPSBsZSA/IHdyaXRlRG91YmxlX2Y2NF9yZXYgOiB3cml0ZURvdWJsZV9mNjRfY3B5O1xyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9jcHkoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzBdID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbMV0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzNdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbNF0gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzZdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbN10gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9yZXYoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzddID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbNl0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzRdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbM10gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzFdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbMF0gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xyXG4gICAgICAgIGV4cG9ydHMucmVhZERvdWJsZUxFID0gbGUgPyByZWFkRG91YmxlX2Y2NF9jcHkgOiByZWFkRG91YmxlX2Y2NF9yZXY7XHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLnJlYWREb3VibGVCRSA9IGxlID8gcmVhZERvdWJsZV9mNjRfcmV2IDogcmVhZERvdWJsZV9mNjRfY3B5O1xyXG5cclxuICAgIC8vIGRvdWJsZTogaWVlZTc1NFxyXG4gICAgfSkoKTsgZWxzZSAoZnVuY3Rpb24oKSB7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHdyaXRlRG91YmxlX2llZWU3NTQod3JpdGVVaW50LCBvZmYwLCBvZmYxLCB2YWwsIGJ1ZiwgcG9zKSB7XHJcbiAgICAgICAgICAgIHZhciBzaWduID0gdmFsIDwgMCA/IDEgOiAwO1xyXG4gICAgICAgICAgICBpZiAoc2lnbilcclxuICAgICAgICAgICAgICAgIHZhbCA9IC12YWw7XHJcbiAgICAgICAgICAgIGlmICh2YWwgPT09IDApIHtcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KDEgLyB2YWwgPiAwID8gLyogcG9zaXRpdmUgKi8gMCA6IC8qIG5lZ2F0aXZlIDAgKi8gMjE0NzQ4MzY0OCwgYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChpc05hTih2YWwpKSB7XHJcbiAgICAgICAgICAgICAgICB3cml0ZVVpbnQoMCwgYnVmLCBwb3MgKyBvZmYwKTtcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgyMTQ2OTU5MzYwLCBidWYsIHBvcyArIG9mZjEpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHZhbCA+IDEuNzk3NjkzMTM0ODYyMzE1N2UrMzA4KSB7IC8vICstSW5maW5pdHlcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgMjE0NjQzNTA3MikgPj4+IDAsIGJ1ZiwgcG9zICsgb2ZmMSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgbWFudGlzc2E7XHJcbiAgICAgICAgICAgICAgICBpZiAodmFsIDwgMi4yMjUwNzM4NTg1MDcyMDE0ZS0zMDgpIHsgLy8gZGVub3JtYWxcclxuICAgICAgICAgICAgICAgICAgICBtYW50aXNzYSA9IHZhbCAvIDVlLTMyNDtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgPj4+IDAsIGJ1ZiwgcG9zICsgb2ZmMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgbWFudGlzc2EgLyA0Mjk0OTY3Mjk2KSA+Pj4gMCwgYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4cG9uZW50ID0gTWF0aC5mbG9vcihNYXRoLmxvZyh2YWwpIC8gTWF0aC5MTjIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChleHBvbmVudCA9PT0gMTAyNClcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXhwb25lbnQgPSAxMDIzO1xyXG4gICAgICAgICAgICAgICAgICAgIG1hbnRpc3NhID0gdmFsICogTWF0aC5wb3coMiwgLWV4cG9uZW50KTtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgKiA0NTAzNTk5NjI3MzcwNDk2ID4+PiAwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlVWludCgoc2lnbiA8PCAzMSB8IGV4cG9uZW50ICsgMTAyMyA8PCAyMCB8IG1hbnRpc3NhICogMTA0ODU3NiAmIDEwNDg1NzUpID4+PiAwLCBidWYsIHBvcyArIG9mZjEpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlTEUgPSB3cml0ZURvdWJsZV9pZWVlNzU0LmJpbmQobnVsbCwgd3JpdGVVaW50TEUsIDAsIDQpO1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVCRSA9IHdyaXRlRG91YmxlX2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRCRSwgNCwgMCk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlYWREb3VibGVfaWVlZTc1NChyZWFkVWludCwgb2ZmMCwgb2ZmMSwgYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgdmFyIGxvID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYwKSxcclxuICAgICAgICAgICAgICAgIGhpID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgdmFyIHNpZ24gPSAoaGkgPj4gMzEpICogMiArIDEsXHJcbiAgICAgICAgICAgICAgICBleHBvbmVudCA9IGhpID4+PiAyMCAmIDIwNDcsXHJcbiAgICAgICAgICAgICAgICBtYW50aXNzYSA9IDQyOTQ5NjcyOTYgKiAoaGkgJiAxMDQ4NTc1KSArIGxvO1xyXG4gICAgICAgICAgICByZXR1cm4gZXhwb25lbnQgPT09IDIwNDdcclxuICAgICAgICAgICAgICAgID8gbWFudGlzc2FcclxuICAgICAgICAgICAgICAgID8gTmFOXHJcbiAgICAgICAgICAgICAgICA6IHNpZ24gKiBJbmZpbml0eVxyXG4gICAgICAgICAgICAgICAgOiBleHBvbmVudCA9PT0gMCAvLyBkZW5vcm1hbFxyXG4gICAgICAgICAgICAgICAgPyBzaWduICogNWUtMzI0ICogbWFudGlzc2FcclxuICAgICAgICAgICAgICAgIDogc2lnbiAqIE1hdGgucG93KDIsIGV4cG9uZW50IC0gMTA3NSkgKiAobWFudGlzc2EgKyA0NTAzNTk5NjI3MzcwNDk2KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGV4cG9ydHMucmVhZERvdWJsZUxFID0gcmVhZERvdWJsZV9pZWVlNzU0LmJpbmQobnVsbCwgcmVhZFVpbn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AgICAgICAgYzI7IC8vIGNoYXJhY3RlciAyXHJcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN0cmluZy5sZW5ndGg7ICsraSkge1xyXG4gICAgICAgIGMxID0gc3RyaW5nLmNoYXJDb2RlQXQoaSk7XHJcbiAgICAgICAgaWYgKGMxIDwgMTI4KSB7XHJcbiAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSBjMTtcclxuICAgICAgICB9IGVsc2UgaWYgKGMxIDwgMjA0OCkge1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gNiAgICAgICB8IDE5MjtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxICAgICAgICYgNjMgfCAxMjg7XHJcbiAgICAgICAgfSBlbHNlIGlmICgoYzEgJiAweEZDMDApID09PSAweEQ4MDAgJiYgKChjMiA9IHN0cmluZy5jaGFyQ29kZUF0KGkgKyAxKSkgJiAweEZDMDApID09PSAweERDMDApIHtcclxuICAgICAgICAgICAgYzEgPSAweDEwMDAwICsgKChjMSAmIDB4MDNGRikgPDwgMTApICsgKGMyICYgMHgwM0ZGKTtcclxuICAgICAgICAgICAgKytpO1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gMTggICAgICB8IDI0MDtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxID4+IDEyICYgNjMgfCAxMjg7XHJcbiAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSBjMSA+PiA2ICAmIDYzIHwgMTI4O1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgICAgICAgJiA2MyB8IDEyODtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gMTIgICAgICB8IDIyNDtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxID4+IDYgICYgNj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40dGhcbiAgICAgICAgICAgIGJpdHMubG8gPSAoYml0cy5sbyB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3KSA+Pj4gMDtcbiAgICAgICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgICAgICByZXR1cm4gYml0cztcbiAgICAgICAgfVxuICAgICAgICAvLyA1dGhcbiAgICAgICAgYml0cy5sbyA9IChiaXRzLmxvIHwgKHRoaXMuYnVmW3RoaXMucG9zXSAmIDEyNykgPDwgMjgpID4+PiAwO1xuICAgICAgICBiaXRzLmhpID0gKGJpdHMuaGkgfCAodGhpcy5idWZbdGhpcy5wb3NdICYgMTI3KSA+PiAgNCkgPj4+IDA7XG4gICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgIHJldHVybiBiaXRzO1xuICAgICAgICBpID0gMDtcbiAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKDsgaSA8IDM7ICsraSkge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICAgICAgLy8gMXN0Li4zdGhcbiAgICAgICAgICAgIGJpdHMubG8gPSAoYml0cy5sbyB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3KSA+Pj4gMDtcbiAgICAgICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgICAgICByZXR1cm4gYml0cztcbiAgICAgICAgfVxuICAgICAgICAvLyA0dGhcbiAgICAgICAgYml0cy5sbyA9IChiaXRzLmxvIHwgKHRoaXMuYnVmW3RoaXMucG9zKytdICYgMTI3KSA8PCBpICogNykgPj4+IDA7XG4gICAgICAgIHJldHVybiBiaXRzO1xuICAgIH1cbiAgICBpZiAodGhpcy5sZW4gLSB0aGlzLnBvcyA+IDQpIHsgLy8gZmFzdCByb3V0ZSAoaGkpXG4gICAgICAgIGZvciAoOyBpIDwgNTsgKytpKSB7XG4gICAgICAgICAgICAvLyA2dGguLjEwdGhcbiAgICAgICAgICAgIGJpdHMuaGkgPSAoYml0cy5oaSB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3ICsgMykgPj4+IDA7XG4gICAgICAgICAgICBpZiAodGhpcy5idWZbdGhpcy5wb3MrK10gPCAxMjgpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGJpdHM7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKDsgaSA8IDU7ICsraSkge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICAgICAgLy8gNnRoLi4xMHRoXG4gICAgICAgICAgICBiaXRzLmhpID0gKGJpdHMuaGkgfCAodGhpcy5idWZbdGhpcy5wb3NdICYgMTI3KSA8PCBpICogNyArIDMpID4+PiAwO1xuICAgICAgICAgICAgaWYgKHRoaXMuYnVmW3RoaXMucG9zKytdIDwgMTI4KVxuICAgICAgICAgICAgICAgIHJldHVybiBiaXRzO1xuICAgICAgICB9XG4gICAgfVxuICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgdGhyb3cgRXJyb3IoXCJpbnZhbGlkIHZhcmludCBlbmNvZGluZ1wiKTtcbn1cblxuLyogZXNsaW50LWVuYWJsZSBuby1pbnZhbGlkLXRoaXMgKi9cblxuLyoqXG4gKiBSZWFkcyBhIHZhcmludCBhcyBhIHNpZ25lZCA2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cy5wb3MgKyBsZW5ndGggPiB0aGlzLmxlbilcbiAgICAgICAgICAgIHRocm93IGluZGV4T3V0T2ZSYW5nZSh0aGlzLCBsZW5ndGgpO1xuICAgICAgICB0aGlzLnBvcyArPSBsZW5ndGg7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgZG8ge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICB9IHdoaWxlICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSAmIDEyOCk7XG4gICAgfVxuICAgIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBTa2lwcyB0aGUgbmV4dCBlbGVtZW50IG9mIHRoZSBzcGVjaWZpZWQgd2lyZSB0eXBlLlxuICogQHBhcmFtIHtudW1iZXJ9IHdpcmVUeXBlIFdpcmUgdHlwZSByZWNlaXZlZFxuICogQHJldHVybnMge1JlYWRlcn0gYHRoaXNgXG4gKi9cblJlYWRlci5wcm90b3R5cGUuc2tpcFR5cGUgPSBmdW5jdGlvbih3aXJlVHlwZSkge1xuICAgIHN3aXRjaCAod2lyZVR5cGUpIHtcbiAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgdGhpcy5za2lwKCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgdGhpcy5za2lwKDgpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgIHRoaXMuc2tpcCh0aGlzLnVpbnQzMigpKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICB3aGlsZSAoKHdpcmVUeXBlID0gdGhpcy51aW50MzIoKSAmIDcpICE9PSA0KSB7XG4gICAgICAgICAgICAgICA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bmN0aW9uKCkgeyBjYWxsYmFjayhFcnJvcihcImFscmVhZHkgZW5kZWRcIikpOyB9LCAwKTtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICB0cnkge1xuICAgICAgICByZXR1cm4gc2VsZi5ycGNJbXBsKFxuICAgICAgICAgICAgbWV0aG9kLFxuICAgICAgICAgICAgcmVxdWVzdEN0b3Jbc2VsZi5yZXF1ZXN0RGVsaW1pdGVkID8gXCJlbmNvZGVEZWxpbWl0ZWRcIiA6IFwiZW5jb2RlXCJdKHJlcXVlc3QpLmZpbmlzaCgpLFxuICAgICAgICAgICAgZnVuY3Rpb24gcnBjQ2FsbGJhY2soZXJyLCByZXNwb25zZSkge1xuXG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJlcnJvclwiLCBlcnIsIG1ldGhvZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhlcnIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVuZCgvKiBlbmRlZEJ5UlBDICovIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghKHJlc3BvbnNlIGluc3RhbmNlb2YgcmVzcG9uc2VDdG9yKSkge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgPSByZXNwb25zZUN0b3Jbc2VsZi5yZXNwb25zZURlbGltaXRlZCA/IFwiZGVjb2RlRGVsaW1pdGVkXCIgOiBcImRlY29kZVwiXShyZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5lbWl0KFwiZXJyb3JcIiwgZXJyLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGVycik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJkYXRhXCIsIHJlc3BvbnNlLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhudWxsLCByZXNwb25zZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG4gICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIHNlbGYuZW1pdChcImVycm9yXCIsIGVyciwgbWV0aG9kKTtcbiAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHsgY2FsbGJhY2soZXJyKTsgfSwgMCk7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxufTtcblxuLyoqXG4gKiBFbmRzIHRoaXMgc2VydmljZSBhbmQgZW1pdHMgdGhlIGBlbmRgIGV2ZW50LlxuICogQHBhcmFtIHtib29sZWFufSBbZW5kZWRCeVJQQz1mYWxzZV0gV2hldGhlciB0aGUgc2VydmljZSBoYXMgYmVlbiBlbmRlZCBieSB0aGUgUlBDIGltcGxlbWVudGF0aW9uLlxuICogQHJldHVybnMge3JwYy5TZXJ2aWNlfSBgdGhpc2BcbiAqL1xuU2VydmljZS5wcm90b3R5cGUuZW5kID0gZnVuY3Rpb24gZW5kKGVuZGVkQnlSUEMpIHtcbiAgICBpZiAodGhpcy5ycGNJbXBsKSB7XG4gICAgICAgIGlmICghZW5kZWRCeVJQQykgLy8gc2lnbmFsIGVuZCB0byBycGNJbXBsXG4gICAgICAgICAgICB0aGlzLnJwY0ltcGwobnVsbCwgbnVsbCwgbnVsbCk7XG4gICAgICAgIHRoaXMucnBjSW1wbCA9IG51bGw7XG4gICAgICAgIHRoaXMuZW1pdChcImVuZFwiK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gpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fY3VycmVudFZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlKSB7XG4gICAgICAgICAgY29udGV4dC5fY3VycmVudFZhbHVlID0gX2N1cnJlbnRWYWx1ZTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF9jdXJyZW50VmFsdWUyOiB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiBjb250ZXh0Ll9jdXJyZW50VmFsdWUyO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlMikge1xuICAgICAgICAgIGNvbnRleHQuX2N1cnJlbnRWYWx1ZTIgPSBfY3VycmVudFZhbHVlMjtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF90aHJlYWRDb3VudDoge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fdGhyZWFkQ291bnQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKF90aHJlYWRDb3VudCkge1xuICAgICAgICAgIGNvbnRleHQuX3RocmVhZENvdW50ID0gX3RocmVhZENvdW50O1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgQ29uc3VtZXI6IHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgaWYgKCFoYXNXYXJuZWRBYm91dFVzaW5nTmVzdGVkQ29udGV4dENvbnN1bWVycykge1xuICAgICAgICAgICAgaGFzV2FybmVkQWJvdXRVc2luZ05lc3RlZENvbnRleHRDb25zdW1lcnMgPSB0cnVlO1xuXG4gICAgICAgICAgICBlcnJvcignUmVuZGVyaW5nIDxDb250ZXh0LkNvbnN1bWVyLkNvbnN1bWVyPiBpcyBub3Qgc3VwcG9ydGVkIGFuZCB3aWx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Age1xuICAgIGRpc2FibGVkRGVwdGgtLTtcblxuICAgIGlmIChkaXNhYmxlZERlcHRoID09PSAwKSB7XG4gICAgICAvKiBlc2xpbnQtZGlzYWJsZSByZWFjdC1pbnRlcm5hbC9uby1wcm9kdWN0aW9uLWxvZ2dpbmcgKi9cbiAgICAgIHZhciBwcm9wcyA9IHtcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICB3cml0YWJsZTogdHJ1ZVxuICAgICAgfTsgLy8gJEZsb3dGaXhNZSBGbG93IHRoaW5rcyBjb25zb2xlIGlzIGltbXV0YWJsZS5cblxuICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnRpZXMoY29uc29sZSwge1xuICAgICAgICBsb2c6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkxvZ1xuICAgICAgICB9KSxcbiAgICAgICAgaW5mbzogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2SW5mb1xuICAgICAgICB9KSxcbiAgICAgICAgd2FybjogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2V2FyblxuICAgICAgICB9KSxcbiAgICAgICAgZXJyb3I6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkVycm9yXG4gICAgICAgIH0pLFxuICAgICAgICBncm91cDogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2R3JvdXBcbiAgICAgICAgfSksXG4gICAgICAgIGdyb3VwQ29sbGFwc2VkOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZHcm91cENvbGxhcHNlZFxuICAgICAgICB9KSxcbiAgICAgICAgZ3JvdXBFbmQ6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1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tcbiAgICAgICAgICAgICAgICAvLyBWOCBhZGRzIGEgXCJuZXdcIiBwcmVmaXggZm9yIG5hdGl2ZSBjbGFzc2VzLiBMZXQncyByZW1vdmUgaXQgdG8gbWFrZSBpdCBwcmV0dGllci5cbiAgICAgICAgICAgICAgICB2YXIgX2ZyYW1lID0gJ1xcbicgKyBzYW1wbGVMaW5lc1tzXS5yZXBsYWNlKCcgYXQgbmV3ICcsICcgYXQgJyk7IC8vIElmIG91ciBjb21wb25lbnQgZnJhbWUgaXMgbGFiZWxlZCBcIjxhbm9ueW1vdXM+XCJcbiAgICAgICAgICAgICAgICAvLyBidXQgd2UgaGF2ZSBhIHVzZXItcHJvdmlkZWQgXCJkaXNwbGF5TmFtZVwiXG4gICAgICAgICAgICAgICAgLy8gc3BsaWNlIGl0IGluIHRvIG1ha2UgdGhlIHN0YWNrIG1vcmUgcmVhZGFibGUuXG5cblxuICAgICAgICAgICAgICAgIGlmIChmbi5kaXNwbGF5TmFtZSAmJiBfZnJhbWUuaW5jbHVkZXMoJzxhbm9ueW1vdXM+JykpIHtcbiAgICAgICAgICAgICAgICAgIF9mcmFtZSA9IF9mcmFtZS5yZXBsYWNlKCc8YW5vbnltb3VzPicsIGZuLmRpc3BsYXlOYW1lKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGZuID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudEZyYW1lQ2FjaGUuc2V0KGZuLCBfZnJhbWUpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gLy8gUmV0dXJuIHRoZSBsaW5lIHdlIGZvdW5kLlxuXG5cbiAgICAgICAgICAgICAgICByZXR1cm4gX2ZyYW1lO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IHdoaWxlIChzID49IDEgJiYgYyA+PSAwKTtcbiAgICAgICAgICB9X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IgUGVyZm9ybWVkV29yayA9XG4vKiAgICAgICAgICAgICAgICAqL1xuMTsgLy8gWW91IGNhbiBjaGFuZ2UgdGhlIHJlc3QgKGFuZCBhZGQgbW9yZSkuXG5cbnZhciBQbGFjZW1lbnQgPVxuLyogICAgICAgICAgICAgICAgICAgICovXG4yO1xudmFyIFVwZGF0ZSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQ7XG52YXIgQ2hpbGREZWxldGlvbiA9XG4vKiAgICAgICAgICAgICAgICAqL1xuMTY7XG52YXIgQ29udGVudFJlc2V0ID1cbi8qICAgICAgICAgICAgICAgICAqL1xuMzI7XG52YXIgQ2FsbGJhY2sgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuNjQ7XG52YXIgRGlkQ2FwdHVyZSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuMTI4O1xudmFyIEZvcmNlQ2xpZW50UmVuZGVyID1cbi8qICAgICAgICAgICAgKi9cbjI1NjtcbnZhciBSZWYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICovXG41MTI7XG52YXIgU25hcHNob3QgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBQYXNzaXZlID1cbi8qICAgICAgICAgICAgICAgICAgICAgICovXG4yMDQ4O1xudmFyIEh5ZHJhdGluZyA9XG4vKiAgICAgICAgICAgICAgICAgICAgKi9cbjQwOTY7XG52YXIgVmlzaWJpbGl0eSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBTdG9yZUNvbnNpc3RlbmN5ID1cbi8qICAgICAgICAgICAgICovXG4xNjM4NDtcbnZhciBMaWZlY3ljbGVFZmZlY3RNYXNrID0gUGFzc2l2ZSB8IFVwZGF0ZSB8IENhbGxiYWNrIHwgUmVmIHwgU25hcHNob3QgfCBTdG9yZUNvbnNpc3RlbmN5OyAvLyBVbmlvbiBvZiBhbGwgY29tbWl0IGZsYWdzIChmbGFncyB3aXRoIH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ICBiID0gcGFyZW50QjtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChfY2hpbGQgPT09IGIpIHtcbiAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgIGIgPSBwYXJlbnRBO1xuICAgICAgICAgIGEgPSBwYXJlbnRCO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICB9XG5cbiAgICAgIGlmICghZGlkRmluZENoaWxkKSB7XG4gICAgICAgIC8vIFNlYXJjaCBwYXJlbnQgQidzIGNoaWxkIHNldFxuICAgICAgICBfY2hpbGQgPSBwYXJlbnRCLmNoaWxkO1xuXG4gICAgICAgIHdoaWxlIChfY2hpbGQpIHtcbiAgICAgICAgICBpZiAoX2NoaWxkID09PSBhKSB7XG4gICAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgICAgYSA9IHBhcmVudEI7XG4gICAgICAgICAgICBiID0gcGFyZW50QTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChfY2hpbGQgPT09IGIpIHtcbiAgICAgICAgICAgIGRpZEZpbmRDaGlsZCA9IHRydWU7XG4gICAgICAgICAgICBiID0gcGFyZW50QjtcbiAgICAgICAgICAgIGEgPSBwYXJlbnRBO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWRpZEZpbmRDaGlsZCkge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ2hpbGQgd2FzIG5vdCBmb3VuZCBpbiBlaXRoZXIgcGFyZW50IHNldC4gVGhpcyBpbmRpY2F0ZXMgYSBidWcgJyArICdpbiBSZWFjdCByZWxhdGVkIHRvI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1ZGVzKCc8YW5vbnltb3VzPicpKSB7XG4gICAgICAgICAgICAgICAgICBfZnJhbWUgPSBfZnJhbWUucmVwbGFjZSgnPGFub255bW91cz4nLCBmbi5kaXNwbGF5TmFtZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBmbiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRGcmFtZUNhY2hlLnNldChmbiwgX2ZyYW1lKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IC8vIFJldHVybiB0aGUgbGluZSB3ZSBmb3VuZC5cblxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIF9mcmFtZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAocyA+PSAxICYmIGMgPj0gMCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0gZmluYWxseSB7XG4gICAgcmVlbnRyeSA9IGZhbHNlO1xuXG4gICAge1xuICAgICAgUmVhY3RDdXJyZW50RGlzcGF0Y2hlci5jdXJyZW50ID0gcHJldmlvdXNEaXNwYXRjaGVyO1xuICAgICAgcmVlbmFibGVMb2dzKCk7XG4gICAgfVxuXG4gICAgRXJyb3IucHJlcGFyZVN0YWNrVHJhY2UgPSBwcmV2aW91c1ByZXBhcmVTdGFja1RyYWNlO1xuICB9IC8vIEZhbGxiYWNrIHRvIGp1c3QgdXNpbmcgdGhlIG5hbWUgaWYgd2UgY291bGRuJ3QgbWFrZSBpdCB0aHJvdy5cblxuXG4gIHZhciBuYW1lID0gZm4gPyBmbi5kaXNwbGF5TmFtZSB8fCBmbi5uYW1lIDogJyc7XG4gIHZhciBzeW50aGV0aWNGcmFtZSA9IG5hbWUgPyBkZXNjcmliZUJ1aWx0SW5Db21wb25lbnRG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AgICBpZiAoIXdhcm5lZEFib3V0TWlzc2luZ0dldENoaWxkQ29udGV4dFtjb21wb25lbnROYW1lXSkge1xuICAgICAgICAgIHdhcm5lZEFib3V0TWlzc2luZ0dldENoaWxkQ29udGV4dFtjb21wb25lbnROYW1lXSA9IHRydWU7XG5cbiAgICAgICAgICBlcnJvcignJXMuY2hpbGRDb250ZXh0VHlwZXMgaXMgc3BlY2lmaWVkIGJ1dCB0aGVyZSBpcyBubyBnZXRDaGlsZENvbnRleHQoKSBtZXRob2QgJyArICdvbiB0aGUgaW5zdGFuY2UuIFlvdSBjYW4gZWl0aGVyIGRlZmluZSBnZXRDaGlsZENvbnRleHQoKSBvbiAlcyBvciByZW1vdmUgJyArICdjaGlsZENvbnRleHRUeXBlcyBmcm9tIGl0LicsIGNvbXBvbmVudE5hbWUsIGNvbXBvbmVudE5hbWUpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBwYXJlbnRDb250ZXh0O1xuICAgIH1cblxuICAgIHZhciBjaGlsZENvbnRleHQgPSBpbnN0YW5jZS5nZXRDaGlsZENvbnRleHQoKTtcblxuICAgIGZvciAodmFyIGNvbnRleHRLZXkgaW4gY2hpbGRDb250ZXh0KSB7XG4gICAgICBpZiAoIShjb250ZXh0S2V5IGluIGNoaWxkQ29udGV4dFR5cGVzKSkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoKGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIoZmliZXIpIHx8ICdVbmtub3duJykgKyBcIi5nZXRDaGlsZENvbnRleHQoKToga2V5IFxcXCJcIiArIGNvbnRleHRLZXkgKyBcIlxcXCIgaXMgbm90IGRlZmluZWQgaW4gY2hpbGRDb250ZXh0VHlwZXMuXCIpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHtcbiAgICAgIHZhciBuYW1lID0gZ2V0Q29tcG9uZW50TmFtZUZyb21GaWJlcihmaWJlcikgfHwgJ1Vua25vd24nO1xuICAgICAgY2hlY2tQc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cmVidWlsdCBhbmQgcmVkZXBsb3llZC5cblxudmFyIFRvdGFsTGFuZXMgPSAzMTtcbnZhciBOb0xhbmVzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjA7XG52YXIgTm9MYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuMDtcbnZhciBTeW5jTGFuZSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4xO1xudmFyIElucHV0Q29udGludW91c0h5ZHJhdGlvbkxhbmUgPVxuLyogICAgKi9cbjI7XG52YXIgSW5wdXRDb250aW51b3VzTGFuZSA9XG4vKiAgICAgICAgICAgICAqL1xuNDtcbnZhciBEZWZhdWx0SHlkcmF0aW9uTGFuZSA9XG4vKiAgICAgICAgICAgICovXG44O1xudmFyIERlZmF1bHRMYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgKi9cbjE2O1xudmFyIFRyYW5zaXRpb25IeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICAgICAgICovXG4zMjtcbnZhciBUcmFuc2l0aW9uTGFuZXMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG40MTk0MjQwO1xudmFyIFRyYW5zaXRpb25MYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG42NDtcbnZhciBUcmFuc2l0aW9uTGFuZTIgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTI4O1xudmFyIFRyYW5zaXRpb25MYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4yNTY7XG52YXIgVHJhbnNpdGlvbkxhbmU0ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUxMjtcbnZhciBUcmFuc2l0aW9uTGFuZTUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBUcmFuc2l0aW9uTGFuZTYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA0ODtcbnZhciBUcmFuc2l0aW9uTGFuZTcgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuNDA5NjtcbnZhciBUcmFuc2l0aW9uTGFuZTggPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBUcmFuc2l0aW9uTGFuZTkgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTYzODQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxMCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjMyNzY4O1xudmFyIFRyYW5zaXRpb25MYW5lMTEgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG42NTUzNjtcbnZhciBUcmFuc2l0aW9uTGFuZTEyID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTMxMDcyO1xudmFyIFRyYW5zaXRpb25MYW5lMTMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4yNjIxNDQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxNCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUyNDI4ODtcbnZhciBUcmFuc2l0aW9uTGFuZTE1ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTA0ODU3NjtcbnZhciBUcmFuc2l0aW9uTGFuZTE2ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA5NzE1MjtcbnZhciBSZXRyeUxhbmVzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4xMzAwMjM0MjQ7XG52YXIgUmV0cnlMYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQxOTQzMDQ7XG52YXIgUmV0cnlMYW5lMiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjgzODg2MDg7XG52YXIgUmV0cnlMYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjE2Nzc3MjE2O1xudmFyIFJldHJ5TGFuZTQ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G5cbiAgICAgIGlmIChlbmFibGVQcm9maWxlclRpbWVyKSB7XG4gICAgICAgIHZhciBzY2hlZHVsZXJQcmlvcml0eTtcblxuICAgICAgICBzd2l0Y2ggKGV2ZW50UHJpb3JpdHkpIHtcbiAgICAgICAgICBjYXNlIERpc2NyZXRlRXZlbnRQcmlvcml0eTpcbiAgICAgICAgICAgIHNjaGVkdWxlclByaW9yaXR5ID0gSW1tZWRpYXRlUHJpb3JpdHk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgQ29udGludW91c0V2ZW50UHJpb3JpdHk6XG4gICAgICAgICAgICBzY2hlZHVsZXJQcmlvcml0eSA9IFVzZXJCbG9ja2luZ1ByaW9yaXR5O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlIERlZmF1bHRFdmVudFByaW9yaXR5OlxuICAgICAgICAgICAgc2NoZWR1bGVyUHJpb3JpdHkgPSBOb3JtYWxQcmlvcml0eTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSBJZGxlRXZlbnRQcmlvcml0eTpcbiAgICAgICAgICAgIHNjaGVkdWxlclByaW9yaXR5ID0gSWRsZVByaW9yaXR5O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgc2NoZWR1bGVyUHJpb3JpdHkgPSBOb3JtYWxQcmlvcml0eTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5qZWN0ZWRIb29rLm9uQ29tbWl0RmliZXJSb290KHJlbmRlcmVySUQsIHJvb3QsIHNjaGVkdWxlclByaW9yaXR5LCBkaWRFcnJvcik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpbmplY3RlZEhvb2sub25Db21taXRGaWJlclJvb3QocmVuZGVyZXJJRCwgcm9vdCwgdW5kZWZpbmVkLCBkaWRFcnJvcik7XG4gICAgICB9XG4gICAgfSBjY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AgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAgdmFyIHRleHQgPSBmaWJlci5wZW5kaW5nUHJvcHM7XG4gICAgICAgICAgICAgIGRpZE5vdEZpbmRIeWRyYXRhYmxlVGV4dEluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdGV4dCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVN1c3BlbnNlSW5zdGFuY2VXaXRoaW5Db250YWluZXIocGFyZW50Q29udGFpbmVyKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHBhcmVudFR5cGUgPSByZXR1cm5GaWJlci50eXBlO1xuICAgICAgICAgIHZhciBwYXJlbnRQcm9wcyA9IHJldHVybkZpYmVyLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgdmFyIHBhcmVudEluc3RhbmNlID0gcmV0dXJuRmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdHlwZSA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgICAgdmFyIF9wcm9wcyA9IGZpYmVyLnBlbmRpbmdQcm9wcztcbiAgICAgICAgICAgICAgICB2YXIgaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90eXBlLCBfcHJvcHMsIC8vIFRPRE86IERlbGV0ZSB0aGlzIGFyZ3VtZW50IHdoZW4gd2UgcmVtb3ZlIHRoZSBsZWdhY3kgcm9vdCBBUEkuXG4gICAgICAgICAgICAgICAgaXNDb25jdXJyZW50TW9kZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdGV4dCA9IGZpYmVyLnBlbmRpbmdQcm9wcztcblxuICAgICAgICAgICAgICAgIHZhciBfaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG5cbiAgICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90ZXh0LCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgICAgIF9pc0NvbmN1cnJlbnRNb2RlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVTdXNwZW5zZUluc3RhbmNlKHBhcmVudFR5cGUsIHBhcmVudFByb3BzLCBwYXJlbnRJbnN0YW5jZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHN1c3BlbnNlU3RhdGUgPSByZXR1cm5GaWJlci5tZW1vaXplZFN0YXRlO1xuICAgICAgICAgIHZhciBfcGFyZW50SW5zdGFuY2UgPSBzdXNwZW5zZVN0YXRlLmRlaHlkcmF0ZWQ7XG4gICAgICAgICAgaWYgKF9wYXJlbnRJbnN0YW5jZSAhPT0gbnVsbCkgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAgdmFyIF90eXBlMiA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgIHZhciBfcHJvcHMyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UsIF90eXBlMiwgX3Byb3BzMik7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICAgICAgICB2YXIgX3RleHQyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZVdpdGhpblN1c3BlbnNlSW5zdGFuY2UoX3BhcmVudEluc3RhbmNlLCBfdGV4dDIpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBTdXNwZW5zZUNvbXBvbmVudDpcbiAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVTdXNwZW5zZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UpO1xuICAgICAgICAgICAgIC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F5bG9hZCA9IHVwZGF0ZS5wYXlsb2FkO1xuXG4gICAgICAgIGlmICh0eXBlb2YgcGF5bG9hZCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgIC8vIFVwZGF0ZXIgZnVuY3Rpb25cbiAgICAgICAgICB7XG4gICAgICAgICAgICBlbnRlckRpc2FsbG93ZWRDb250ZXh0UmVhZEluREVWKCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIG5leHRTdGF0ZSA9IHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKCB3b3JrSW5Qcm9ncmVzcy5tb2RlICYgU3RyaWN0TGVnYWN5TW9kZSkge1xuICAgICAgICAgICAgICBzZXRJc1N0cmljdE1vZGVGb3JEZXZ0b29scyh0cnVlKTtcblxuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIHNldElzU3RyaWN0TW9kZUZvckRldnRvb2xzKGZhbHNlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleGl0RGlzYWxsb3dlZENvbnRleHRSZWFkSW5ERVYoKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gbmV4dFN0YXRlO1xuICAgICAgICB9IC8vIFN0YXRlIG9iamVjdFxuXG5cbiAgICAgICAgcmV0dXJuIHBheWxvYWQ7XG4gICAgICB9XG5cbiAgICBjYXNlIENhcHR1cmVVcGRhdGU6XG4gICAgICB7XG4gICAgICAgIHdvcmtJblByb2dyZXNzLmZsYWdzID0gd29ya0luUHJvZ3Jlc3MuZmxhZ3MgJiB+U2hvdWxkQ2FwdHVyZSB8IERpZENhcHR1cmU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FDVF9FTEVNRU5UX1RZUEU6XG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKG5ld0NoaWxkLmtleSA9PT0ga2V5KSB7XG4gICAgICAgICAgICAgIHJldHVybiB1cGRhdGVFbGVtZW50KHJldHVybkZpYmVyLCBvbGRGaWJlciwgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX1BPUlRBTF9UWVBFOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmIChuZXdDaGlsZC5rZXkgPT09IGtleSkge1xuICAgICAgICAgICAgICByZXR1cm4gdXBkYXRlUG9ydGFsKHJldHVybkZpYmVyLCBvbGRGaWJlciwgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgcGF5bG9hZCA9IG5ld0NoaWxkLl9wYXlsb2FkO1xuICAgICAgICAgICAgdmFyIGluaXQgPSBuZXdDaGlsZC5faW5pdDtcbiAgICAgICAgICAgIHJldHVybiB1cGRhdGVTbG90KHJldHVybkZpYmVyLCBvbGRGaWJlciwgaW5pdChwYXlsb2FkKSwgbGFuZXMpO1xuICAgICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGlzQXJyYXkobmV3Q2hpbGQpIHx8IGdldEl0ZXJhdG9yRm4obmV3Q2hpbGQpKSB7XG4gICAgICAgIGlmIChrZXkgIT09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB1cGRhdGVGcmFnbWVudChyZXR1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gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGtub3duS2V5cyA9PT0gbnVsbCkge1xuICAgICAgICAgICAga25vd25LZXlzID0gbmV3IFNldCgpO1xuICAgICAgICAgICAga25vd25LZXlzLmFkZChrZXkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKCFrbm93bktleXMuaGFzKGtleSkpIHtcbiAgICAgICAgICAgIGtub3duS2V5cy5hZGQoa2V5KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGVycm9yKCdFbmNvdW50ZXJlZCB0d28gY2hpbGRyZW4gd2l0aCB0aGUgc2FtZSBrZXksIGAlc2AuICcgKyAnS2V5cyBzaG91bGQgYmUgdW5pcXVlIHNvIHRoYXQgY29tcG9uZW50cyBtYWludGFpbiB0aGVpciBpZGVudGl0eSAnICsgJ2Fjcm9zcyB1cGRhdGVzLiBOb24tdW5pcXVlIGtleXMgbWF5IGNhdXNlIGNoaWxkcmVuIHRvIGJlICcgKyAnZHVwbGljYXRlZCBhbmQvb3Igb21pdHRlZCBcdTIwMTQgdGhlIGJlaGF2aW9yIGlzIHVuc3VwcG9ydGVkIGFuZCAnICsgJ2NvdWxkIGNoYW5nZSBpbiBhIGZ1dHVyZSB2ZXJzaW9uLicsIGtleSk7XG5cbiAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAgICB2YXIgcGF5bG9hZCA9IGNoaWxkLl9wYXlsb2FkO1xuICAgICAgICAgIHZhciBpbml0ID0gY2hpbGQuX2luaXQ7XG4gICAgICAgICAgd2Fybk9uSW52YWxpZEtleShpbml0KHBheWxvYWQpLCBrbm93bktleXMsIHJldHVybkZpYmVyKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ga25vd25LZXlzO1xuICB9XG5cbiAgZnVuY3Rpb24g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bWVudChyZXR1cm5GaWJlciwgY3VycmVudEZpcnN0Q2hpbGQsIGVsZW1lbnQsIGxhbmVzKSB7XG4gICAgdmFyIGtleSA9IGVsZW1lbnQua2V5O1xuICAgIHZhciBjaGlsZCA9IGN1cnJlbnRGaXJzdENoaWxkO1xuXG4gICAgd2hpbGUgKGNoaWxkICE9PSBudWxsKSB7XG4gICAgICAvLyBUT0RPOiBJZiBrZXkgPT09IG51bGwgYW5kIGNoaWxkLmtleSA9PT0gbnVsbCwgdGhlbiB0aGlzIG9ubHkgYXBwbGllcyB0b1xuICAgICAgLy8gdGhlIGZpcnN0IGl0ZW0gaW4gdGhlIGxpc3QuXG4gICAgICBpZiAoY2hpbGQua2V5ID09PSBrZXkpIHtcbiAgICAgICAgdmFyIGVsZW1lbnRUeXBlID0gZWxlbWVudC50eXBlO1xuXG4gICAgICAgIGlmIChlbGVtZW50VHlwZSA9PT0gUkVBQ1RfRlJBR01FTlRfVFlQRSkge1xuICAgICAgICAgIGlmIChjaGlsZC50YWcgPT09IEZyYWdtZW50KSB7XG4gICAgICAgICAgICBkZWxldGVSZW1haW5pbmdDaGlsZHJlbihyZXR1cm5GaWJlciwgY2hpbGQuc2libGluZyk7XG4gICAgICAgICAgICB2YXIgZXhpc3RpbmcgPSB1c2VGaWJlcihjaGlsZCwgZWxlbWVudC5wcm9wcy5jaGlsZHJlbik7XG4gICAgICAgICAgICBleGlzdGluZy5yZXR1cm4gPSByZXR1cm5GaWJlcjtcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdGluZy5fZGVidWdTb3VyY2UgPSBlbGVtZW50Ll9zb3VyY2U7XG4gICAgICAgICAgICAgIGV4aXN0aW5nLl9kZWJ1Z093bmVyID0gZWxlbWVudC5fb3duZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBleGlzdGluZztcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKGNoaWxkLmVsZW1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yBjYW4ndCBiZSBjb250ZW50IHJvd3MuXG5cbiAgICAgICAgICAgIGlmIChjdXJyZW50Um93ICE9PSBudWxsICYmIGZpbmRGaXJzdFN1c3BlbmRlZChjdXJyZW50Um93KSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAvLyBUaGlzIGlzIHRoZSBiZWdpbm5pbmcgb2YgdGhlIG1haW4gY29udGVudC5cbiAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3MuY2hpbGQgPSByb3c7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgbmV4dFJvdyA9IHJvdy5zaWJsaW5nO1xuICAgICAgICAgICAgcm93LnNpYmxpbmcgPSBfdGFpbDtcbiAgICAgICAgICAgIF90YWlsID0gcm93O1xuICAgICAgICAgICAgcm93ID0gbmV4dFJvdztcbiAgICAgICAgICB9IC8vIFRPRE86IElmIHdvcmtJblByb2dyZXNzLmNoaWxkIGlzIG51bGwsIHdlIGNhbiBjb250aW51ZSBvbiB0aGUgdGFpbCBpbW1lZGlhdGVseS5cblxuXG4gICAgICAgICAgaW5pdFN1c3BlbnNlTGlzdFJlbmRlclN0YXRlKHdvcmtJblByb2dyZXNzLCB0cnVlLCAvLyBpc0JhY2t3YXJkc1xuICAgICAgICAgIF90YWlsLCBudWxsLCAvLyBsYXN0XG4gICAgICAgICAgdGFpbE1vZGUpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgJ3RvZ2V0aGVyJzpcbiAgICAgICAge1xuICAgICAgICAgIGluaXRTdXNwZW5zZUxpc3RSZW5kZXJTdGF0ZSh3b3JrSW5Qcm9ncmVzcywgZmFsc2UsIC8vIGlzQmFja3dhcmRzXG4gICAgICAgICAgbnVsbCwgLy8gdGFpbFxuICAgICAgICAgIG51bGwsIC8vIGxhc3RcbiAgICAgICAgICB1bmRlZmluZWQpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAg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G5vZGUudGFnID09PSBIb3N0Q29tcG9uZW50IHx8IG5vZGUudGFnID09PSBIb3N0VGV4dCkge1xuICAgICAgICBhcHBlbmRJbml0aWFsQ2hpbGQocGFyZW50LCBub2RlLnN0YXRlTm9kZSk7XG4gICAgICB9IGVsc2UgaWYgKG5vZGUudGFnID09PSBIb3N0UG9ydGFsKSA7IGVsc2UgaWYgKG5vZGUuY2hpbGQgIT09IG51bGwpIHtcbiAgICAgICAgbm9kZS5jaGlsZC5yZXR1cm4gPSBub2RlO1xuICAgICAgICBub2RlID0gbm9kZS5jaGlsZDtcbiAgICAgICAgY29udGludWU7XG4gICAgICB9XG5cbiAgICAgIGlmIChub2RlID09PSB3b3JrSW5Qcm9ncmVzcykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSB3b3JrSW5Qcm9ncmVzcykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIG5vZGUgPSBub2RlLnJldHVybjtcbiAgICAgIH1cblxuICAgICAgbm9kZS5zaWJsaW5nLnJldHVybiA9IG5vZGUucmV0dXJuO1xuICAgICAgbm9kZSA9IG5vZGUuc2libGluZztcbiAgICB9XG4gIH07XG5cbiAgdXBkYXRlSG9zdENvbnRhaW5lciA9IGZ1bmN0aW9uIChjdXJyZW50LCB3b3JrSW5Qcm9ncmVzcykgey8vIE5vb3BcbiAgfTtcblxuICB1cGRhdGVIb3N0Q29tcG9uZW50JDEgPSBmdW5jdGlvbiAoY3VycmVudCwgd29ya0luUHJvZ3Jlc3MsIHR5cGUsIG5ld1Byb3BzLCByb290Q29udGFpbmVySW5zdGFuY2UpIHtcbiAgICAvLyBJZiB3ZSBoYXZlIGFuIGFsdGVybmF0ZSwgdGhhdCBtZWFucyB0aGlzIGlzIGFuIHVw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GFzU3VzcGVuc2VDb250ZXh0KHN1c3BlbnNlU3RhY2tDdXJzb3IuY3VycmVudCwgSW52aXNpYmxlUGFyZW50U3VzcGVuc2VDb250ZXh0KSkge1xuICAgICAgICAgICAgICAgIC8vIElmIHRoaXMgd2FzIGluIGFuIGludmlzaWJsZSB0cmVlIG9yIGEgbmV3IHJlbmRlciwgdGhlbiBzaG93aW5nXG4gICAgICAgICAgICAgICAgLy8gdGhpcyBib3VuZGFyeSBpcyBvay5cbiAgICAgICAgICAgICAgICByZW5kZXJEaWRTdXNwZW5kKCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gT3RoZXJ3aXNlLCB3ZSdyZSBnb2luZyB0byBoYXZlIHRvIGhpZGUgY29udGVudCBzbyB3ZSBzaG91bGRcbiAgICAgICAgICAgICAgICAvLyBzdXNwZW5kIGZvciBsb25nZXIgaWYgcG9zc2libGUuXG4gICAgICAgICAgICAgICAgcmVuZGVyRGlkU3VzcGVuZERlbGF5SWZQb3NzaWJsZSgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHdha2VhYmxlcyA9IHdvcmtJblByb2dyZXNzLnVwZGF0ZVF1ZXVlO1xuXG4gICAgICAgIGlmICh3YWtlYWJsZXMgIT09IG51bGwpIHtcbiAgICAgICAgICAvLyBTY2hlZHVsZSBhbiBlZmZlY3QgdG8gYXR0YWNoIGEgcmV0cnkgbGlzdGVuZXIgdG8gdGhlIHByb21pc2UuXG4gICAgICAgICAgLy8gVE9ETzogTW92ZSB0byBwYXNzaXZlIHBoYXNlXG4gICAgICAgICAgd29ya0luUHJvZ3Jlc3MuZmxhZ3MgfD0gVXBkYXRlO1xuICAgICAgICB9XG5cbiAgICAgICAgYnViYmxlUHJvcGVydGllcyh3b3JrSW5Qcm9ncmVzcyk7XG5cbiAgICAgICAge1xuICAgICAgICAgIGlmICgod29ya0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2UHJvcHMgOiByZXNvbHZlRGVmYXVsdFByb3BzKGZpbmlzaGVkV29yay50eXBlLCBwcmV2UHJvcHMpLCBwcmV2U3RhdGUpO1xuXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBkaWRXYXJuU2V0ID0gZGlkV2FybkFib3V0VW5kZWZpbmVkU25hcHNob3RCZWZvcmVVcGRhdGU7XG5cbiAgICAgICAgICAgICAgaWYgKHNuYXBzaG90ID09PSB1bmRlZmluZWQgJiYgIWRpZFdhcm5TZXQuaGFzKGZpbmlzaGVkV29yay50eXBlKSkge1xuICAgICAgICAgICAgICAgIGRpZFdhcm5TZXQuYWRkKGZpbmlzaGVkV29yay50eXBlKTtcblxuICAgICAgICAgICAgICAgIGVycm9yKCclcy5nZXRTbmFwc2hvdEJlZm9yZVVwZGF0ZSgpOiBBIHNuYXBzaG90IHZhbHVlIChvciBudWxsKSAnICsgJ211c3QgYmUgcmV0dXJuZWQuIFlvdSBoYXZlIHJldHVybmVkIHVuZGVmaW5lZC4nLCBnZXRDb21wb25lbnROYW1lRnJvbUZpYmVyKGZpbmlzaGVkV29yaykpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlID0gc25hcHNob3Q7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIGlmIChzdXBwb3J0c011dGF0aW9uKSB7XG4gICAgICAgICAgICB2YXIgcm9vdCA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7XG4gICAgICAgICAgICBjbGVhckNvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdEN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JveTtcbiAgICAgICAgZWZmZWN0LmRlc3Ryb3kgPSB1bmRlZmluZWQ7XG5cbiAgICAgICAgaWYgKGRlc3Ryb3kgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBQYXNzaXZlJDEpICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgbWFya0NvbXBvbmVudFBhc3NpdmVFZmZlY3RVbm1vdW50U3RhcnRlZChmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgfSBlbHNlIGlmICgoZmxhZ3MgJiBMYXlvdXQpICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdFVubW91bnRTdGFydGVkKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKChmbGFncyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICBzZXRJc1J1bm5pbmdJbnNlcnRpb25FZmZlY3QodHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZmluaXNoZWRXb3JrLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcblxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgc2V0SXNSdW5uaW5nSW5zZXJ0aW9uRWZmZWN0KGZhbHNlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAoKGZsYWdzICYgUGFzc2l2ZSQxKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgIG1hcmtDb21wb25lbnRQYX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kgIT09IE5vRmxhZ3MpIHtcbiAgICAgIHN3aXRjaCAoZmluaXNoZWRXb3JrLnRhZykge1xuICAgICAgICBjYXNlIFByb2ZpbGVyOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXNzaXZlRWZmZWN0RHVyYXRpb24gPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlLnBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgIHZhciBfZmluaXNoZWRXb3JrJG1lbW9pemUgPSBmaW5pc2hlZFdvcmsubWVtb2l6ZWRQcm9wcyxcbiAgICAgICAgICAgICAgICBpZCA9IF9maW5pc2hlZFdvcmskbWVtb2l6ZS5pZCxcbiAgICAgICAgICAgICAgICBvblBvc3RDb21taXQgPSBfZmluaXNoZWRXb3JrJG1lbW9pemUub25Qb3N0Q29tbWl0OyAvLyBUaGlzIHZhbHVlIHdpbGwgc3RpbGwgcmVmbGVjdCB0aGUgcHJldmlvdXMgY29tbWl0IHBoYXNlLlxuICAgICAgICAgICAgLy8gSXQgZG9lcyBub3QgZ2V0IHJlc2V0IHVudGlsIHRoZSBzdGFydCBvZiB0aGUgbmV4dCBjb21taXQgcGhhc2UuXG5cbiAgICAgICAgICAgIHZhciBjb21taXRUaW1lID0gZ2V0Q29tbWl0VGltZSgpO1xuICAgICAgICAgICAgdmFyIHBoYXNlID0gZmluaXNoZWRXb3JrLmFsdGVybmF0ZSA9PT0gbnVsbCA/ICdtb3VudCcgOiAndXBkYXRlJztcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAoaXNDdXJyZW50VXBkYXRlTmVzdGVkKCkpIHtcbiAgICAgICAgICAgICAgICBwaGFzZSA9ICduZXN0ZWQtdXBkYXRlJztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIG9uUG9zdENvbW1pdCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICBvblBvc3RDb21taXQoaWQsIHBoYXNlLCBwYXNzaXZlRWZmZWN0RHVyYXRpb24sIGNvbW1pdFRpbWUpO1xuICAgICAgICAgICAgfSAvLyBCdWJibGUgdGltZXMgdG8gdGhlIG5leHQgbmVhcmVzdCBhbmNlc3RvciBQcm9maWxlci5cbiAgICAgICAgICAgIC8vIEFmdGVyIHdlIHByb2Nlc3MgdGhhdCBQcm9maWxlciwgd2UnbGwgYnViYmxlIGZ1cnRoZXIgdXAuXG5cblxuICAgICAgICAgICAgdmFyIHBhcmVudEZpYmVyID0gZmluaXNoZWRXb3JrLnJldHVybjtcblxuICAgICAgICAgICAgb3V0ZXI6IHdoaWxlIChwYXJlbnRGaWJlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICAgICAgICAgICAgICB2YXIgcm9vdCA9IHBhcmVudEZpYmVyLnN0YXRlTm9kZTtcbiAgICAgICAgICAgICAgICAgIHJvb3QucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBQcm9maWxlcjpcbiAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnRTdGF0ZU5vZGUgPSBwYXJlbnRGaWJlci5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZU5vZGUucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcGFyZW50RmliZXIgPSBwYXJlbnRGaWJlci5yZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO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5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdE1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdE1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmIChmaW5pc2hlZFdvcmsuZmxhZ3MgJiBVcGRhdGUpIHtcbiAgICAgICAgICAgIGlmICghb2Zmc2NyZWVuU3VidHJlZVdhc0hpZGRlbikge1xuICAgICAgICAgICAgICBpZiAoY3VycmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIC8vIFdlIGNvdWxkIHVwZGF0ZSBpbnN0YW5jZSBwcm9wcyBhbmQgc3RhdGUgaGVyZSxcbiAgICAgICAgICAgICAgICAvLyBidXQgaW5zdGVhZCB3ZSByZWx5IG9uIHRoZW0gYmVpbmcgc2V0IGR1cmluZyBsYXN0IHJlbmRlci5cbiAgICAgICAgICAgICAgICAvLyBUT0RPOiByZXZpc2l0IHRoaXMgd2hlbiB3ZSBpbXBsZW1lbnQgcmVzdW1pbmcuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay50eXBlID09PSBmaW5pc2h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7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIGZpbmlzaGVkV29yay5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFuY2UuY29tcG9uZW50RGlkTW91bnQoKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZE1vdW50KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBwcmV2UHJvcHMgPSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgPT09IGZpbmlzaGVkV29yay50eXBlID8gY3VycmVudC5tZW1vaXplZFByb3BzIDogcmVzb2x2ZURlZmF1bHRQcm9wcyhmaW5pc2hlZFdvcmsudHlwZSwgY3VycmVudC5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgICAgICB2YXIgcHJldlN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlOyAvLyBXZSBjb3VsZCB1cGRhdGUgaW5zdGFuY2UgcHJvcHMgYW5kIHN0YXRlIGhlcmUsXG4gICAgICAgICAgICAgICAgLy8gYnV0IGluc3RlYWQgd2UgcmVseSBvbiB0aGVtIGJlaW5nIHNldCBkdXJpbmcgbGFzdCByZW5kZXIuXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogcmV2aXNpdCB0aGlzIHdo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3RhdGVgLiAnICsgJ1BsZWFzZSBmaWxlIGFuIGlzc3VlLicsIGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIoZmluaXNoZWRXb3JrKSB8fCAnaW5zdGFuY2UnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICAgICAgICBpbnN0YW5jZS5jb21wb25lbnREaWRVcGRhdGUocHJldlByb3BzLCBwcmV2U3RhdGUsIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZFVwZGF0ZShwcmV2UHJvcHMsIHByZXZTdGF0ZSwgaW5zdGFuY2UuX19yZWFjdEludGVybmFsU25hcHNob3RCZWZvcmVVcGRhdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gLy8gVE9ETzogSSB0aGluayB0aGlzIGlzIG5vdyBhbHdheXMgbm9uLW51bGwgYnkgdGhlIHRpbWUgaXQgcmVhY2hlcyB0aGVcbiAgICAgICAgICAvLyBjb21taXQgcGhhc2UuIENvbnNpZGVyIHJlbW92aW5nIHRoZSB0eXBlIGNoZWNrLlxuXG5cbiAgICAg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ICAgaWYgKGZpbmlzaGVkV29yay5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBzd2l0Y2ggKGZpbmlzaGVkV29yay5jaGlsZC50YWcpIHtcbiAgICAgICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgICAgICBfaW5zdGFuY2UgPSBnZXRQdWJsaWNJbnN0YW5jZShmaW5pc2hlZFdvcmsuY2hpbGQuc3RhdGVOb2RlKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAgICAgICAgICAgIF9pbnN0YW5jZSA9IGZpbmlzaGVkV29yay5jaGlsZC5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb21taXRVcGRhdGVRdWV1ZShmaW5pc2hlZFdvcmssIF91cGRhdGVRdWV1ZSwgX2luc3RhbmNlKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX2luc3RhbmNlMiA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7IC8vIFJlbmRlcmVycyBtYXkgc2NoZWR1bGUgd29yayB0byBiZSBkb25lIGFmdGVyIGhvc3QgY29tcG9uZW50cyBhcmUgbW91bnRlZFxuICAgICAgICAgIC8vIChlZyBET00gcmVuZGVyZXIgbWF5IHNjaGVkdWxlIGF1dG8tZm9jdXMgZm9yIGlucHV0cyBhbmQgZm9ybSBjb250cm9scykuXG4gICAgICAgICAgLy8gVGhlc2UgZWZmZWN0cyBzaG91bGQgb25seSBiZSBjb21taXR0ZWQgd2hlbiBjb21wb25lbnRzIGFyZSBmaXJzdCBtb3VudGVkLFxuICAgICAgICAgIC8vIGFrYSB3aGVuIHRoZXJlIGlzIG5vIGN1cnJlbnQvYWx0ZXJuYXRlLlxuXG4gICAgICAgICAgaWYgKGN1cnJlbnQgPT09IG51bGwgJiYgZmluaXNoZWRXb3JrLmZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlO1xuICAgICAgICAgICAgdmFyIHByb3BzID0gZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICBjb21taXRNb3VudChfaW5zdGFuY2UyLCB0eXBlLCBwcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICB7XG4gICAgICAgICAgLy8gV2UgaGF2ZSBubyBsaWZlLWN5Y2xlcyBhc3NvY2lhdGVkIHdpdGggdGV4dC5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RQb3J0YWw6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBXZSBoYXZlIG5vIGxpZmUtY3ljbGVzIGFzc29jaWF0ZWQgd2l0aCBwb3J0YWxzLlxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgUHJvZmlsZXI6XG4gICAgICAgIHtcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgX2ZpbmlzaGVkV29yayRtZW1vaXplMiA9IGZpbmlzaGVkV29yay5tZW1vaXplZFByb3BzLFxuICAgICAgICAgICAgICAgIG9uQ29tbWl0ID0gX2ZpbmlzaGVkV29yayRtZW1vaXplMi5vbkNvbW1pdCxcbiAgICAgICAgICAgICAgICBvblJlbmRlciA9IF9maW5pc2hlZFdvcmskbWVtb2l6ZTIub25SZW5kZXI7XG4gICAgICAgICAgICB2YXIgZWZmZWN0RHVyYXRpb24gPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlLmVmZmVjdER1cmF0aW9uO1xuICAgICAgICAgICAgdmFyIGNvbW1pdFRpbWUgPSBnZXRDb21taXRUaW1lKCk7XG4gICAgICAgICAgICB2YXIgcGhhc2UgPSBjdXJyZW50ID09PSBudWxsID8gJ21vdW50JyA6ICd1cGRhdGUnO1xuXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGlmIChpc0N1cnJlbnRVcGRhdGVOZXN0ZWQoKSkge1xuICAgICAgICAgICAgICAgIHBoYXNlID0gJ25lc3RlZC11cGRhdGUnO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2Ygb25SZW5kZXIgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgb25SZW5kZXIoZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHMuaWQsIHBoYXNlLCBmaW5pc2hlZFdvcmsuYWN0dWFsRHVyYXRpb24sIGZpbmlzaGVkV29yay50cmVlQmFzZUR1cmF0aW9uLCBmaW5pc2hlZFdvcmsuYWN0dWFsU3RhcnRUaW1lLCBjb21taXRUaW1lKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIG9uQ29tbWl0ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgb25Db21taXQoZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHMuaWQsIHBoYXNlLCBlZmZlY3REdXJhdGlvbiwgY29tbWl0VGltZSk7XG4gICAgICAgICAgICAgIH0gLy8gU2NoZWR1bGUgYSBwYXNzaXZlIGVmZmVjdCBmb3IgdGhpcyBQcm9maWxlciB0byBjYWxsIG9uUG9zdENvbW1pdCBob29rcy5cbiAgICAgICAgICAgICAgLy8gVGhpcyBlZmZlY3Qgc2hvdWxkIGJlIHNjaGVkdWxlZCBldmVuIGlmIHRoZXJlIGlzIG5vIG9uUG9zdENvbW1pdCBjYWxsYmFjayBmb3IgdGhpcyBQcm9maWxlcixcbiAgICAgICAgICAgICAgLy8gYmVjYXVzZSB0aGUgZWZmZWN0IGlzIGFsc28gd2hlcmUgdGltZXMgYnViYmxlIHRvIHBhcmVudCBQcm9maWxlcnMuXG5cblxuICAgICAgICAgICAgICBlbnF1ZXVlUGVuZGluZ1Bhc3NpdmVQcm9maWxlckVmZmVjdChmaW5pc2hlZFdvcmspOyAvLyBQcm9wYWdhdGUgbGF5b3V0IGVmZmVjdCBkdXJhdGlvbnMgdG8gdGhlIG5leHQgbmVhcmVzdCBQcm9maWxlciBhbmNlc3Rvci5cbiAgICAgICAgICAgICAgLy8gRG8gbm90IHJlc2V0IHRoZXNlIHZhbHVlcyB1bnRpbCB0aGUgbmV4dCByZW5kZXIgc28gRGV2VG9vbHMgaGFzIGEgY2hhbmNlIHRvIHJlYWQgdGhlbSBmaXJzdC5cblxuICAgICAgICAgICAgICB2YXIgcGFyZW50RmliZXIgPSBmaW5pc2hlZFdvcmsucmV0dXJuO1xuXG4gICAgICAgICAgICAgIG91dGVyOiB3aGlsZSAocGFyZW50RmliZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJvb3QgPSBwYXJlbnRGaWJlci5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICAgIHJvb3QuZWZmZWN0RHVyYXRpb24gKz0gZWZmZWN0RHVyYXRpb247XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgICBjYXNlIFByb2ZpbGVyOlxuICAgICAgICAgICAgICAgICAgICB2YXIgcGFyZW50U3RhdGVOb2RlID0gcGFyZW50RmliZXIuc3RhdGVOb2RlO1xuICAgICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0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gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHZhciBpbnN0YW5jZSA9IG5vZGUuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgICBpZiAoaXNIaWRkZW4pIHtcbiAgICAgICAgICAgICAgaGlkZUluc3RhbmNlKGluc3RhbmNlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHVuaGlkZUluc3RhbmNlKG5vZGUuc3RhdGVOb2RlLCBub2RlLm1lbW9pemVkUHJvcHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAobm9kZS50YWcgPT09IEhvc3RUZXh0KSB7XG4gICAgICAgIGlmIChob3N0U3VidHJlZVJvb3QgPT09IG51bGwpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIF9pbnN0YW5jZTMgPSBub2RlLnN0YXRlTm9kZTtcblxuICAgICAgICAgICAgaWYgKGlzSGlkZGVuKSB7XG4gICAgICAgICAgICAgIGhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB1bmhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMywgbm9kZS5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKChub2RlLnRhZyA9PT0gT2Zmc2NyZWVuQ29tcG9uZW50IHx8IG5vZGUudGFnID09PSBMZWdhY3lIaWRkZW5Db21wb25lbnQpICYmIG5vZGUubWVtb2l6ZWRTdGF0ZSAhPT0gbnVsbCAmJiBub2RlICE9PSBmaW5pc2hlZFdvcmspIDsgZWxzZSBpZiAobm9kZS5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIG5vZGUgPSBub2RlLmNoaWxkO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKG5vZGUgPT09IGZpbmlzaGVkV29yaykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSBmaW5pc2hlZFdvcmspIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaG9zdFN1YnRyZWVSb290ID09PSBub2RlKSB7XG4gICAgICAgICAgaG9zdFN1YnRyZWVSb290ID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIG5vZGUgPSBub2RlLnJldHVybjtcbiAgICAgIH1cblxuICAgICAgaWYgKGhvc3RTdWJ0cmVlUm9vdCA9PT0gbm9kZSkge1xuICAgICAgICBob3N0U3VidHJlZVJvb3QgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICBub2RlLnNpYmxpbmcucmV0dXJuID0gbm9kZS5yZXR1cm47XG4gICAgICBub2RlID0gbm9kZS5zaWJsaW5nO1xuICAgIH1cbiAgfVxufVxuXG5mdW5jdGlvbiBjb21taXRBdHRhY2hSZWYoZmluaXNoZWRXb3JrKSB7XG4gIHZhciByZWYgPSBmaW5pc2hlZFdvcmsucmVmO1xuXG4gIGlmIChyZWYgIT09IG51bGwpIHtcbiAgICB2YX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sIHdlXG4gICAgLy8gY2FuIHRyYWNrIHRoZSBuZWFyZXN0IGhvc3QgY29tcG9uZW50IG9uIHRoZSBKUyBzdGFjayBhcyB3ZSB0cmF2ZXJzZSB0aGVcbiAgICAvLyB0cmVlIGR1cmluZyB0aGUgY29tbWl0IHBoYXNlLiBUaGlzIHdvdWxkIG1ha2UgaW5zZXJ0aW9ucyBmYXN0ZXIsIHRvby5cbiAgICB2YXIgcGFyZW50ID0gcmV0dXJuRmliZXI7XG5cbiAgICBmaW5kUGFyZW50OiB3aGlsZSAocGFyZW50ICE9PSBudWxsKSB7XG4gICAgICBzd2l0Y2ggKHBhcmVudC50YWcpIHtcbiAgICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlO1xuICAgICAgICAgICAgaG9zdFBhcmVudElzQ29udGFpbmVyID0gZmFsc2U7XG4gICAgICAgICAgICBicmVhayBmaW5kUGFyZW50O1xuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIEhvc3RSb290OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICBob3N0UGFyZW50SXNDb250YWluZXIgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICBob3N0UGFyZW50SXNDb250YWluZXIgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHBhcmVudCA9IHBhcmVudC5yZXR1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ZWQgY2hpbGRyZW4gZG9uJ3RcbiAgICAgICAgLy8gbmVlZCB0byBiZSByZW1vdmVkLlxuICAgICAgICBpZiAoc3VwcG9ydHNNdXRhdGlvbikge1xuICAgICAgICAgIHZhciBwcmV2SG9zdFBhcmVudCA9IGhvc3RQYXJlbnQ7XG4gICAgICAgICAgdmFyIHByZXZIb3N0UGFyZW50SXNDb250YWluZXIgPSBob3N0UGFyZW50SXNDb250YWluZXI7XG4gICAgICAgICAgaG9zdFBhcmVudCA9IG51bGw7XG4gICAgICAgICAgcmVjdXJzaXZlbHlUcmF2ZXJzZURlbGV0aW9uRWZmZWN0cyhmaW5pc2hlZFJvb3QsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlbGV0ZWRGaWJlcik7XG4gICAgICAgICAgaG9zdFBhcmVudCA9IHByZXZIb3N0UGFyZW50O1xuICAgICAgICAgIGhvc3RQYXJlbnRJc0NvbnRhaW5lciA9IHByZXZIb3N0UGFyZW50SXNDb250YWluZXI7XG5cbiAgICAgICAgICBpZiAoaG9zdFBhcmVudCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgLy8gTm93IHRoYXQgYWxsIHRoZSBjaGlsZCBlZmZlY3RzIGhhdmUgdW5tb3VudGVkLCB3ZSBjYW4gcmVtb3ZlIHRoZVxuICAgICAgICAgICAgLy8gbm9kZSBmcm9tIHRoZSB0cmVlLlxuICAgICAgICAgICAgaWYgKGhvc3RQYXJlbnRJc0NvbnRhaW5lcikge1xuICAgICAgICAgICAgICByZW1vdmVDaGlsZEZyb21Db250YWluZXIoaG9zdFBhcmVudCwgZGVsZXRlZEZpYmVyLnN0YXRlTm9kZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZW1vdmVDaGlsZChob3N0UGFyZW50LCBkZWxldGVkRmliZXIuc3RhdGVOb2RlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmVjd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0ZVF1ZXVlLmxhc3RFZmZlY3Q7XG5cbiAgICAgICAgICAgIGlmIChsYXN0RWZmZWN0ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBmaXJzdEVmZmVjdCA9IGxhc3RFZmZlY3QubmV4dDtcbiAgICAgICAgICAgICAgdmFyIGVmZmVjdCA9IGZpcnN0RWZmZWN0O1xuXG4gICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICB2YXIgX2VmZmVjdCA9IGVmZmVjdCxcbiAgICAgICAgICAgICAgICAgICAgZGVzdHJveSA9IF9lZmZlY3QuZGVzdHJveSxcbiAgICAgICAgICAgICAgICAgICAgdGFnID0gX2VmZmVjdC50YWc7XG5cbiAgICAgICAgICAgICAgICBpZiAoZGVzdHJveSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoKHRhZyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgodGFnICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0YXJ0ZWQoZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICggZGVsZXRlZEZpYmVyLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGRlbGV0ZWRGaWJlcik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZGVsZXRlZEZpYmVyLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0b3BwZWQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGVmZmVjdCA9IGVmZmVjdC5uZXh0O1xuICAgICAgICAgICAgICB9IHdoaWxlIChlZmZlY3QgIT09IGZpcnN0RWZmZWN0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlRGVsZXRpb25FZmZlY3RzKGZpbmlzaGVkUm9vdCwgbmVhcmVzdE1vdW50ZWRBbmNlc3RvciwgZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgIHtcbiAgICAgICAgaWYgKCFvZmZzY3JlZW5TdWJ0cmVlV2FzSGlkZGVuKSB7XG4gICAgICAgICAgc2FmZWx5RGV0YWNoUmVmKGRlbGV0ZWRGaWJlciwgbmVhcmVzdE1vdW50ZWRBbmNlc3Rvcik7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZGVsZXRlZEZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmICh0eXB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ZXJyaWRlIGEgcmVmIHNldFxuICAgICAgICAgIC8vIGJ5IGEgY3JlYXRlIGZ1bmN0aW9uIGluIGFub3RoZXIgY29tcG9uZW50IGR1cmluZyB0aGUgc2FtZSBjb21taXQuXG5cblxuICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdFVubW91bnQoTGF5b3V0IHwgSGFzRWZmZWN0LCBmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQgfCBIYXNFZmZlY3QsIGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybik7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICByZ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4gICAgICAgICAgICAgIC8vIGFzIHRoZSBuZXdQcm9wcy4gVGhlIHVwZGF0ZVBheWxvYWQgd2lsbCBjb250YWluIHRoZSByZWFsIGNoYW5nZSBpblxuICAgICAgICAgICAgICAvLyB0aGlzIGNhc2UuXG5cbiAgICAgICAgICAgICAgdmFyIG9sZFByb3BzID0gY3VycmVudCAhPT0gbnVsbCA/IGN1cnJlbnQubWVtb2l6ZWRQcm9wcyA6IG5ld1Byb3BzO1xuICAgICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlOyAvLyBUT0RPOiBUeXBlIHRoZSB1cGRhdGVRdWV1ZSB0byBiZSBzcGVjaWZpYyB0byBob3N0IGNvbXBvbmVudHMuXG5cbiAgICAgICAgICAgICAgdmFyIHVwZGF0ZVBheWxvYWQgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG4gICAgICAgICAgICAgIGZpbmlzaGVkV29yay51cGRhdGVRdWV1ZSA9IG51bGw7XG5cbiAgICAgICAgICAgICAgaWYgKHVwZGF0ZVBheWxvYWQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgY29tbWl0VXBkYXRlKF9pbnN0YW5jZTQsIHVwZGF0ZVBheWxvYWQsIHR5cGUsIG9sZFByb3BzLCBuZXdQcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgIHtcbiAgICAgICA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V4dEluc3RhbmNlLCBvbGRUZXh0LCBuZXdUZXh0KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgIGNhcHR1cmVDb21taXRQaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICB7XG4gICAgICAgIHJlY3Vyc2l2ZWx5VHJhdmVyc2VNdXRhdGlvbkVmZmVjdHMocm9vdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgY29tbWl0UmVjb25jaWxpYXRpb25FZmZlY3RzKGZpbmlzaGVkV29yayk7XG5cbiAgICAgICAgaWYgKGZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgaWYgKHN1cHBvcnRzTXV0YXRpb24gJiYgc3VwcG9ydHNIeWRyYXRpb24pIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBwcmV2Um9vdFN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlO1xuXG4gICAgICAgICAgICAgIGlmIChwcmV2Um9vdFN0YXRlLmlzRGVoeWRyYXRlZCkge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICBjb21taXRIeWRyYXRlZENvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoc3VwcG9ydHNQZXJzaXN0ZW5jZSkge1xuICAgICAgICAgICAgdmFyIGNvbnRhaW5lckluZm8gPSByb290LmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICB2YXIgcGVuZGluZ0NoaWxkcmVuID0gcm9vdC5wZW5kaW5nQ2hpbGRyZW47XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHJlcGxhY2VDb250YWluZXJDaGlsZHJlbihjb250YWluZXJJbmZvLCBwZW5kaW5nQ2hpbGRyZW4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN0cyhmaW5pc2hlZFdvcmspO1xuXG4gICAgICAgIGlmIChmbGFncyAmIFVwZGF0ZSkge1xuICAgICAgICAgIGlmIChzdXBwb3J0c1BlcnNpc3RlbmNlKSB7XG4gICAgICAgICAgICB2YXIgcG9ydGFsID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcbiAgICAgICAgICAgIHZhciBfY29udGFpbmVySW5mbyA9IHBvcnRhbC5jb250YWluZXJJbmZvO1xuICAgICAgICAgICAgdmFyIF9wZW5kaW5nQ2hpbGRyZW4gPSBwb3J0YWwucGVuZGluZ0NoaWxkcmVuO1xuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgIC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uICAgICAgICAgIGlmIChpc0hpZGRlbikge1xuICAgICAgICAgICAgdmFyIHdhc0hpZGRlbiA9IG9mZnNjcmVlbkZpYmVyLmFsdGVybmF0ZSAhPT0gbnVsbCAmJiBvZmZzY3JlZW5GaWJlci5hbHRlcm5hdGUubWVtb2l6ZWRTdGF0ZSAhPT0gbnVsbDtcblxuICAgICAgICAgICAgaWYgKCF3YXNIaWRkZW4pIHtcbiAgICAgICAgICAgICAgLy8gVE9ETzogTW92ZSB0byBwYXNzaXZlIHBoYXNlXG4gICAgICAgICAgICAgIG1hcmtDb21taXRUaW1lT2ZGYWxsYmFjaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmbGFncyAmIFVwZGF0ZSkge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb21taXRTdXNwZW5zZUNhbGxiYWNrKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgIGNhcHR1cmVDb21taXRQaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGF0dGFjaFN1c3BlbnNlUmV0cnlMaXN0ZW5lcnMoZmluaXNoZWRXb3JrKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgT2Zmc2NyZWVuQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICB2YXIgX3dhc0hpZGRlbiA9IGN1cnJlbnQgIT09IG51bGwgJiYgY3VycmVudC5tZW1vaXplZFN0YXRlICE9PSBudWxsO1xuXG4gICAgICAgIGlmICggLy8gVE9ETzogUmVtb3ZlIHRoaXMgZGVhZCBmbGFnXG4gICAgICAgICBmaW5pc2hlZFdvcmsubW9kZSAmIENvbmN1cnJlbnRNb2RlKSB7XG4gICAgICAgICAgL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0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgY29tbWl0SG9va0VmZmVjdExpc3RVbm1vdW50KExheW91dCwgZmliZXIsIGZpYmVyLnJldHVybik7XG4gICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaWJlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQsIGZpYmVyLCBmaWJlci5yZXR1cm4pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBUT0RPIChPZmZzY3JlZW4pIENoZWNrOiBmbGFncyAmIFJlZlN0YXRpY1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICB2YXIgaW5zdGFuY2UgPSBmaWJlci5zdGF0ZU5vZGU7XG5cbiAgICAgICAgICBpZiAodHlwZW9mIGluc3RhbmNlLmNvbXBvbmVudFdpbGxVbm1vdW50ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICBzYWZlbHlDYWxsQ29tcG9uZW50V2lsbFVubW91bnQoZmliZXIsIGZpYmVyLnJldHVybiwgaW5zdGFuY2UpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIE9mZnNjcmVlbkNvbXBvbmVudDpcbiAgICAgICAge1xuICAg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luY29uc2lzdGVudCBzdG9yZS5cbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgIC8vIElmIGBnZXRTbmFwc2hvdGAgdGhyb3dzLCByZXR1cm4gYGZhbHNlYC4gVGhpcyB3aWxsIHNjaGVkdWxlXG4gICAgICAgICAgICAgIC8vIGEgcmUtcmVuZGVyLCBhbmQgdGhlIGVycm9yIHdpbGwgYmUgcmV0aHJvd24gZHVyaW5nIHJlbmRlci5cbiAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHZhciBjaGlsZCA9IG5vZGUuY2hpbGQ7XG5cbiAgICBpZiAobm9kZS5zdWJ0cmVlRmxhZ3MgJiBTdG9yZUNvbnNpc3RlbmN5ICYmIGNoaWxkICE9PSBudWxsKSB7XG4gICAgICBjaGlsZC5yZXR1cm4gPSBub2RlO1xuICAgICAgbm9kZSA9IGNoaWxkO1xuICAgICAgY29udGludWU7XG4gICAgfVxuXG4gICAgaWYgKG5vZGUgPT09IGZpbmlzaGVkV29yaykge1xuICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuXG4gICAgd2hpbGUgKG5vZGUuc2libGluZyA9PT0gbnVsbCkge1xuICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSBmaW5pc2hlZFdvcmspIHtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG5cbiAgICAgIG5vZGUgPSBub2RlLnJldHVybjtcbiAgICB9XG5cbiAgICBub2RlLnNpYmxpbmcucmV0dXJuID0gbm9kZS5yZXR1cm47XG4gICAgbm9kZSA9IG5vZGUuc2libGluZztcbiAgfSAvLyBGbG93IGRvZXNuJ3Qga25vdyB0aGlzIGlz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tcbiAge1xuICAgIHZhciBub2RlID0gZmliZXI7XG4gICAgdmFyIGZvdW5kSG9zdEluc3RhbmNlcyA9IGZhbHNlO1xuXG4gICAgd2hpbGUgKHRydWUpIHtcbiAgICAgIGlmIChub2RlLnRhZyA9PT0gSG9zdENvbXBvbmVudCkge1xuICAgICAgICAvLyBXZSBnb3QgYSBtYXRjaC5cbiAgICAgICAgZm91bmRIb3N0SW5zdGFuY2VzID0gdHJ1ZTtcbiAgICAgICAgaG9zdEluc3RhbmNlcy5hZGQobm9kZS5zdGF0ZU5vZGUpOyAvLyBUaGVyZSBtYXkgc3RpbGwgYmUgbW9yZSwgc28ga2VlcCBzZWFyY2hpbmcuXG4gICAgICB9IGVsc2UgaWYgKG5vZGUuY2hpbGQgIT09IG51bGwpIHtcbiAgICAgICAgbm9kZS5jaGlsZC5yZXR1cm4gPSBub2RlO1xuICAgICAgICBub2RlID0gbm9kZS5jaGlsZDtcbiAgICAgICAgY29udGludWU7XG4gICAgICB9XG5cbiAgICAgIGlmIChub2RlID09PSBmaWJlcikge1xuICAgICAgICByZXR1cm4gZm91bmRIb3N0SW5zdGFuY2VzO1xuICAgICAgfVxuXG4gICAgICB3aGlsZSAobm9kZS5zaWJsaW5nID09PSBudWxsKSB7XG4gICAgICAgIGlmIChub2RlLnJldHVybiA9PT0gbnVsbCB8fCBub2RlLnJldHVybiA9PT0gZmliZXIpIHtcbiAgICAgICAgICByZXR1cm4gZm91bmRIb3N0SW5zdGFuY2VzO1xuICAgICAgICB9XG5cbiAgICAgICAgbm9kZSA9IG5vZGUucmV0dXJuO1xuICAgICAgfVxuXG4gICAgICBub2RlLnNpYmxpbmcucmV0dXJuID0gbm9kZS5yZXR1cm47XG4gICAgICBub2RlID0gbm9kZS5zaWJsaW5nO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiBmYWxzZTtcbn1cblxudmFyIGhhc0JhZE1hcFBvbHlmaWxsO1xuXG57XG4gIGhhc0JhZE1hcFBvbHlmaWxsID0gZmF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ZhbGx0aHJvdWdoXG5cbiAgICAgIGNhc2UgUkVBQ1RfQ0FDSEVfVFlQRTpcblxuICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWZhbGx0aHJvdWdoXG5cbiAgICAgIGNhc2UgUkVBQ1RfVFJBQ0lOR19NQVJLRVJfVFlQRTpcblxuICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWZhbGx0aHJvdWdoXG5cbiAgICAgIGNhc2UgUkVBQ1RfREVCVUdfVFJBQ0lOR19NT0RFX1RZUEU6XG5cbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1mYWxsdGhyb3VnaFxuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHR5cGUuJCR0eXBlb2YpIHtcbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9QUk9WSURFUl9UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gQ29udGV4dFByb3ZpZGVyO1xuICAgICAgICAgICAgICAgIGJyZWFrIGdldFRhZztcblxuICAgICAgICAgICAgICBjYXNlIFJFQUNUX0NPTlRFWFRfVFlQRTpcbiAgICAgICAgICAgICAgICAvLyBUaGlzIGlzIGEgY29uc3VtZXJcbiAgICAgICAgICAgICAgICBmaWJlclRhZyA9IENvbnRleHRDb25zdW1lcjtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9GT1JXQVJEX1JFRl9UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gRm9yd2FyZFJlZjtcblxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IHJlc29sdmVGb3J3YXJkUmVmRm9ySG90UmVsb2FkaW5nKHJlc29sdmVkVHlwZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuXG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfTUVNT19UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gTWVtb0NvbXBvbmVudDtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9MQVpZX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBMYXp5Q29tcG9uZW50O1xuICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciBpbmZvID0gJyc7XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gdW5kZWZpbmVkIHx8IHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsICYmIE9iamVjdC5rZXlzKHR5cGUpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICBpbmZvICs9ICcgWW91IGxpa2VseSBmb3Jnb3QgdG8gZXhwb3J0IHlvdXIgY29tcG9uZW50IGZyb20gdGhlIGZpbGUgJyArIFwiaXQncyBkZWZpbmVkIGluLCBvciB5b3UgbWlnaHQgaGF2ZSBtaXhlZCB1cCBkZWZhdWx0IGFuZCBcIiArICduYW1lZCBpbXBvcnRzLic7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBvd25lck5hbWUgPSBvd25lciA/IGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIob3duZXIpIDogbnVsbDtcblxuICAgICAgICAgICAgaWYgKG93bmVyTmFtZSkge1xuICAgICAgICAgICAgICBpbmZvICs9ICdcXG5cXG5DaGVjay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mRIb3N0SW5zdGFuY2VXaXRoV2FybmluZyhjb21wb25lbnQsIG1ldGhvZE5hbWUpIHtcbiAge1xuICAgIHZhciBmaWJlciA9IGdldChjb21wb25lbnQpO1xuXG4gICAgaWYgKGZpYmVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgIGlmICh0eXBlb2YgY29tcG9uZW50LnJlbmRlciA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1VuYWJsZSB0byBmaW5kIG5vZGUgb24gYW4gdW5tb3VudGVkIGNvbXBvbmVudC4nKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXMoY29tcG9uZW50KS5qb2luKCcsJyk7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcihcIkFyZ3VtZW50IGFwcGVhcnMgdG8gbm90IGJlIGEgUmVhY3RDb21wb25lbnQuIEtleXM6IFwiICsga2V5cyk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIGhvc3RGaWJlciA9IGZpbmRDdXJyZW50SG9zdEZpYmVyKGZpYmVyKTtcblxuICAgIGlmIChob3N0RmliZXIgPT09IG51bGwpIHtcbiAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIGlmIChob3N0RmliZXIubW9kZSAmIFN0cmljdExlZ2FjeU1vZGUpIHtcbiAgICAgIHZhciBjb21wb25lbnROYW1lID0gZ2V0Q29tcG9uZW50TmFtZUZyb21GaWJlcihmaWJlcikgfHwgJ0NvbXBvbmVudCc7XG5cbiAgICAgIGlmICghZGlkV2FybkFib3V0RmluZE5vZGVJblN0cmljdE1vZGVbY29tcG9uZW50TmFtZV0pIHtcbiAgICAgICAgZGlkV2FybkFib3V0RmluZE5vZGVJblN0cmljdE1vZGVbY29tcG9uZW50TmFtZV0gPSB0cnVlO1xuICAgICAgICB2YXIgcHJldmlvdXNGaWJlciA9IGN1cnJlbnQ7XG5cbiAgICAgICAgdHJ5IH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cyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNsaXAgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlZWQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaG91bGRSZXNldCA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJBbmltYXRpb25TdGF0ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkFuaW1hdGlvblN0YXRlIHx8IChQQkFuaW1hdGlvblN0YXRlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQkFuaW1hdG9yIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYW5pbWF0b3IuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBbmltYXRvclNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDEwNDIsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyK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gICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQkF1ZGlvU291cmNlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52b2x1bWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5waXRjaCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmF1ZGlvQ2xpcFVybCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF1ZGlvU291cmNlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXVkaW9Tb3VyY2UgfHwgKFBCQXVkaW9Tb3VyY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXVkaW9Tb3VyY2UgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdWRpb19zb3VyY2UuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBdWRpb1NvdXJjZVNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6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pO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uudm9sdW1lID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXJsID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3Nh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7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYXZhdGFySWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYW5jaG9yUG9pbnRJZCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCQXZhdGFyQXR0YWNoLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyQXR0YWNoIHx8IChQQkF2YXRhckF0dGFjaCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJBdmF0YXJBdHRhY2ggfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdmF0YXJfYXR0YWNoLmdlbic7XG4vKipcbiAqIEBpbnRlcm5h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HJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4Y2x1ZGVJZHMucHVzaChyZWFkZXIuc3RyaW5nKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGlmaWVycy5wdXNoKHJlYWRlci5pbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbmQyID0gcmVhZGVyLnVpbnQzMigpICsgcmVhZGVyLnBvcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kaWZpZXJzLnB1c2gocmVhZGVyLmludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF2YXRhck1vZGlmaWVyQXJlYS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkF2YXRhck1vZGlmaWVyQXJlYSB8fCAoUEJBdmF0YXJNb2RpZmllckFyZWEgPSB7fSkpO1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLmNvbW1vblwiO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBvc2l0aW9uKCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAsIHo6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBvc2l0aW9uO1xuKGZ1bmN0aW9uIChQb3NpdGlvbikge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UueCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UueSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS55KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS56ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI5KS5mbG9hdChtZXNzYWdlLnopO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBvc2l0aW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUG9zaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnogPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQb3NpdGlvbi5kZWNvZGUgPSBkZWNvZGU7XG59KShQb3NpdGlvbiB8fCAoUG9zaXRpb24gPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVZlY3RvcjMoKSB7XG4gICAgcmV0dXJuIHsgeDogMCwgeTogMCwgejogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgVmVjdG9yMztcbihmdW5jdGlvbiAoVmVjdG9yMykge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UueCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UueSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS55KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS56ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI5KS5mbG9hdChtZXNzYWdlLnopO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFZlY3RvcjMuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWZWN0b3IzKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS56ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgVmVjdG9yMy5kZWNvZGUgPSBkZWNvZGU7XG59KShWZWN0b3IzIHx8IChWZWN0b3IzID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VWZWN0b3IyKCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFZlY3RvcjI7XG4oZnVuY3Rpb24gKFZlY3RvcjIpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS54ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLngpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UueSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVmVjdG9yMi5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVZlY3RvcjIoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZlY3RvcjIuZGVjb2RlID0gZGVjb2RlO1xufSkoVmVjdG9yMiB8fCAoVmVjdG9yMiA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUXVhdGVybmlvbigpIHtcbiAgICByZXR1cm4geyB4OiAwLCB5OiAwLCB6OiAwLCB3OiAwIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBRdWF0ZXJuaW9uO1xuKGZ1bmN0aW9uIChRdWF0ZXJuaW9uKSB7XG4gICAgZnVuY3Rpb24gZW5jb2RlKG1lc3NhZ2UsIHdyaXRlciA9IF9tMC5Xcml0ZXIuY3JlYXRlKCkpIHtcbiAgICAgICAgaWYgKG1lc3NhZ2UueCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMykuZmxvYXQobWVzc2FnZS54KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS55ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIxKS5mbG9hdChtZXNzYWdlLnkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnogIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2Uueik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UudyAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS53KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBRdWF0ZXJuaW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUXVhdGVybmlvbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS55ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLncgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBRdWF0ZXJuaW9uLmRlY29kZSA9IGRlY29kZTtcbn0pKFF1YXRlcm5pb24gfHwgKFF1YXRlcm5pb24gPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXZhdGFyTW9kaWZpZXJBcmVhIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYXZhdGFyX21vZGlmaWVyX2FyZWEuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBdmF0YXJNb2RpZmllckFyZWFTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDcwLFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlc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gICAgd3JpdGVyLnVpbnQzMig3MikuYm9vbChtZXNzYWdlLnRhbGtpbmcpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLndlYXJhYmxlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4Mikuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLmVtb3Rlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5MCkuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCQXZhdGFyU2hhcGUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQkF2YXRhclNoYXBlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubmFtZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ib2R5U2hhcGUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2tpbkNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaGFpckNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZXllQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5leHByZXNzaW9uVHJpZ2dlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDY0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4cHJlc3Npb25UcmlnZ2VyVGltZXN0YW1wID0gbG9uZ1RvTnVtYmVyKHJlYWRlci5pbnQ2NCgpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50YWxraW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VhcmFibGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1vdGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF2YXRhclNoYXBlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyU2hhcGUgfHwgKFBCQXZhdGFyU2hhcGUgPSB7fSkpO1xuY29uc3QgdHNQcm90b0dsb2JhbFRoaXMgPSAoKCkgPT4ge1xuICAgIGlmICh0eXBlb2YgZ2xvYmFsVGhpcyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICByZXR1cm4gZ2xvYmFsVGhpcztcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBzZWxmICE9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgIHJldHVybiBzZWxmO1xuICAgIH1cbiAgICBpZiAodHlwZW9mI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Ckge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMykuZmxvYXQobWVzc2FnZS5yKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5nICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIxKS5mbG9hdChtZXNzYWdlLmcpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmIgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2UuYik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgQ29sb3IzLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlQ29sb3IzKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuciA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmcgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5iID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgQ29sb3IzLmRlY29kZSA9IGRlY29kZTtcbn0pKENvbG9yMyB8fCAoQ29sb3IzID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VDb2xvcjQoKSB7XG4gICAgcmV0dXJuIHsgcjogMCwgZzogMCwgYjogMCwgYTogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgQ29sb3I0O1xuKGZ1bmN0aW9uIChDb2xvcjQpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5yICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLnIpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmcgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UuZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyOSkuZmxvYXQobWVzc2FnZS5iKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5hICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDM3KS5mbG9hdChtZXNzYWdlLmEpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIENvbG9yNC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbG9yNCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnIgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmEgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBDb2xvcjQuZGVjb2Rl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IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJDYW1lcmFNb2RlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJDYW1lcmFNb2RlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQ2FtZXJhTW9kZSB8fCAoUEJDYW1lcmFNb2RlID0ge30pKTtcbiIsICJpbXBvcnQge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GggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCQ2FtZXJhTW9kZUFyZWEoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkNhbWVyYU1vZGVBcmVhLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQ2FtZXJhT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md0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJFbmdpbmVJbmZvKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mcmFtZU51bWJlciA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50b3RhbFJ1bnRpbWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICA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dlLnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzIpLnVpbnQzMihtZXNzYWdlLnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5pbnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDApLnVpbnQzMihtZXNzYWdlLmludmlzaWJsZU1lc2hlc0NvbGxpc2lvbk1hc2spO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCR2x0ZkNvbnRhaW5lcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aXNpYmxlTWVzaGVzQ29sbGlzaW9uTWFzayA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5pbnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkdsdGZDb250YWluZXIgfHwgKFBCR2x0ZkNvbnRhaW5lciA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJHbHRmQ29udGFpbmVyIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvZ2x0Zl9jb250YWluZXIuZ2VuJ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gICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jdXJyZW50U3RhdGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkdsdGZDb250YWluZXJMb2FkaW5nU3RhdGUuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlIHx8IChQQkdsdGZDb250YWluZXJMb2FkaW5nU3RhdGUgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCR2x0ZkNvbnRhaW5lckxvYWRpbmdTdGF0ZSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL2dsdGZfY29udGFpbmVyX2xvYWRpbmdfc3RhdGUuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0OSxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlLmVuY29kZSh2YWx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IucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWF0ZXJpYWwgPSB7ICRjYXNlOiBcInVubGl0XCIsIHVubGl0OiBQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hdGVyaWFsID0geyAkY2FzZTogXCJwYnJcIiwgcGJyOiBQQk1hdGVyaWFsX1Bick1hdGVyaWFsLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWF0ZXJpYWwgfHwgKFBCTWF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pbnQzMigzNCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0dXJlID0gVGV4dHVyZVVuaW9uLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYWxwaGFUZXN0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY2FzdFNoYWRvd3MgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpZmZ1c2VDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbCA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJNYXRlcmlhbF9QYnJNYXRlcmlhbCgpIHtcbiAgICByZXR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kZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmVtaXNzaXZlQ29sb3IgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgQ29sb3IzLmVuY29kZShtZXNzYWdlLmVtaXNzaXZlQ29sb3IsIHdyaXRlci51aW50MzIoNjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmVmbGVjdGl2aXR5Q29sb3IgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgQ29sb3IzLmVuY29kZShtZXNzYWdlLnJlZmxlY3Rpdml0eUNvbG9yLCB3cml0ZXIudWludDMyKDc0KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRyYW5zcGFyZW5jeU1vZGUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS50cmFuc3BhcmVuY3lNb2RlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tZXRhbGxpYyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDkzKS5mbG9hdChtZXNzYWdlLm1ldGFsbGljKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5yb3VnaG5lc3MgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDEpLmZsb2F0KG1lc3NhZ2Uucm91Z2huZXNzKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5zcGVjdWxhckludGVuc2l0eSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExNykuZmxvYXQobWVzc2FnZS5zcGVjdWxhckludGVuc2l0eSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZW1pc3NpdmVJbnRlbnNpdHkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMjUpLmZsb2F0KG1lc3NhZ2UuZW1pc3NpdmVJbnRlbnNpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmRpcmVjdEludGVuc2l0eSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzMykuZmxvYXQobWVzc2FnZS5kaXJlY3RJbnRlbnNpdHkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsX1Bick1hdGVyaWFsKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFscGhhVGVzdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNhc3RTaGFkb3dzID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbHBoYVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbWlzc2l2ZVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5idW1wVGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDU4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsYmVkb0NvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1pc3NpdmVDb2xvciA9IENvbG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDc0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJlZmxlY3Rpdml0eUNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRyYW5zcGFyZW5jeU1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWV0YWxsaWMgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJvdWdobmVzcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMTcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlY3VsYXJJbnRlbnNpdHkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmVtaXNzaXZlSW50ZW5zaXR5ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3RJbnRlbnNpdHkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsX1Bick1hdGVyaWFsLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwgPSB7fSkpO1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5k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XNlVGV4dHVyZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53cmFwTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpbHRlck1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZX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X20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VBdmF0YXJUZXh0dXJlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXNlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmlsdGVyTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAg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uaW50MzIobWVzc2FnZS5maWx0ZXJNb2RlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBWaWRlb1RleHR1cmUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWaWRlb1RleHR1cmUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZpZGVvUGxheWVyRW50aXR5ID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmlsdGVyTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZpZGVvVGV4dHVyZS5kZWNvZGUgPSBkZWNvZGU7XG59KShWaWRlb1RleHR1cmUgfHwgKFZpZGVvVGV4dHVyZSA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlVGV4dHVyZVVuaW9uKCkge1xuICAgIHJldHVybiB7IHRleDogdW5kZWZpbmVkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBUZXh0dXJlVW5pb247XG4oZnVuY3Rpb24gKFRleHR1cmVVbmlvbikge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIHN3aXRjaCAobWVzc2FnZS50ZXg/LiRjYXNlKSB7XG4gICAgICAgICAgICBjYXNlIFwidGV4dHVyZVwiOlxuICAgICAgICAgICAgICAgIFRleHR1cmUuZW5jb2RlKG1lc3NhZ2UudGV4LnRleHR1cmUsIHdyaXRlci51aW50MzIoMTApLmZvcmsoKSkubGRlbGltKCk7XG4g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ApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4ID0geyAkY2FzZTogXCJ0ZXh0dXJlXCIsIHRleHR1cmU6IFRleHR1cmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleCA9IHsgJGNhc2U6IFwiYXZhdGFyVGV4dHVyZVwiLCBhdmF0YXJUZXh0dXJlOiBBdmF0YXJUZXh0dXJlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXggPSB7ICRjYXNlOiBcInZpZGVvVGV4dHVyZVwiLCB2aWRlb1RleHR1cmU6IFZpZGVvVGV4dHVyZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3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zZVBCTWVzaENvbGxpZGVyKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImJveFwiLCBib3g6IFBCTWVzaENvbGxpZGVyX0JveE1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcInNwaGVyZVwiLCBzcGhlcmU6IFBCTWVzaENvbGxpZGVyX1NwaGVyZU1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImN5bGluZGVyXCIsIGN5bGluZGVyOiBQQk1lc2hDb2xsaWRlcl9DeWxpbmRlck1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcInBsYW5lXCIsIHBsYW5lOiBQQk1lc2hDb2xsaWRlcl9QbGFuZU1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWVzaENvbGxpZGVyLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWVzaENvbGxpZGVyIHx8IChQQk1lc2hDb2xsaWRlciA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJNZXNoQ29sbGlkZXJfQm94TWVzaCgpIHtcbiAgICByZXR1cm4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BlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c1RvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c0JvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaC5kZWNvZGUgPSB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gbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiYm94XCIsIGJveDogUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwic3BoZXJlXCIsIHNwaGVyZTogUEJNZXNoUmVuZGVyZXJfU3BoZXJlTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiY3lsaW5kZXJcIiwgY3lsaW5kZXI6IFBCTWVzaFJlbmRlcmVyX0N5bGluZGVyTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwicGxhbmVcIiwgcGxhbmU6IFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXIuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJNZXNoUmVuZGVyZXIgfHwgKFBCTWVzaFJlbmRlcmVyID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9Cb3hNZXNoKCkge1xuICAgIHJldHVybiB7IHV2czogW10gfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBCTWVzaFJlbmRlcmVyX0JveE1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX0JveE1lc2gpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICB3cml0ZXIudWludDMyKDEwKS5mb3JrKCk7XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLnV2cykge1xuICAgICAgICAgICAgd3JpdGVyLmZsb2F0KHYpO1xuICAgICAgICB9XG4gICAgICAgIHdyaXRlci5sZGVsaW0oKTtcbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyX0JveE1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2cy5wdXNoKHJlYWRlci5mbG9hdCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1lc2hSZW5kZXJlcl9Cb3hNZXNoIHx8IChQQk1lc2hSZW5kZXJlcl9Cb3hNZXNoID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2goKSB7XG4gICAgcmV0dXJuIHsgcmFkaXVzVG9wOiB1bmRlZmluZWQsIHJhZGl1c0JvdHRvbTogdW5kZWZpbmVkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX0N5bGluZGVyTWVzaCkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnJhZGl1c1RvcCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLnJhZGl1c1RvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmFkaXVzQm90dG9tICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UucmFkaXVzQm90dG9tKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2guZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2guZGVjb2RlID0gZGVjb2RlO1xufSkoUEJNZXNoUmVuZGVyZXJfQ3lsaW5kZXJNZXNoIHx8IChQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2ggPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCgpIHtcbiAgICByZXR1cm4geyB1dnM6IFtdIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIHdyaXRlci51aW50MzIoMTApLmZvcmsoKTtcbiAgICAgICAgZm9yIChjb25zdCB2IG9mIG1lc3NhZ2UudXZzKSB7XG4gICAgICAgICAgICB3cml0ZXIuZmxvYXQodik7XG4gICAgICAgIH1cbiAgICAgICAgd3JpdGVyLmxkZWxpbSgpO1xuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2guZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2cy5wdXNoKHJlYWRlci5mbG9hdCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXJfUGxhbmVNZXNoLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCB8fCAoUEJNZXNoUmVuZGVyZXJfUGxhbmVNZXNoID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9TcGhlcmVNZXNoKCkge1xuICAgIHJldHVybiB7fTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBCTWVzaFJlbmRlcmVyX1NwaGVyZU1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX1NwaGVyZU1lc2gpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUoXywgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9TcGhlcmVNZXNoLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdG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GUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmNvbG9yICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIENvbG9yMy5lbmNvZGUobWVzc2FnZS5jb2xvciwgd3JpdGVyLnVpbnQzMigyNikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk5mdFNoYXBlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJOZnRTaGFwZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnVybiA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdHlsZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJOZnRTaGFwZS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk5mdFNoYXBlIHx8IChQQk5mdFNoYXBlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQk5mdFNoYXBlIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvbmZ0X3NoYXBlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgTmZ0U2hhcGVTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDQwLFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQk5mdFNoYXBlLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0I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Z2UsIHdyaXRlciA9IF9tMC5Xcml0ZXIuY3JlYXRlKCkpIHtcbiAgICAgICAgZm9yIChjb25zdCB2IG9mIG1lc3NhZ2UucG9pbnRlckV2ZW50cykge1xuICAgICAgICAgICAgUEJQb2ludGVyRXZlbnRzX0VudHJ5LmVuY29kZSh2LCB3cml0ZXIudWludDMyKDEwKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50cy5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCUG9pbnRlckV2ZW50cygpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJFdmVudHMucHVzaChQQlBvaW50ZXJFdmVudHNfRW50cnkuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSk7XG4gICAgICAgICAgICA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ICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhvdmVyVGV4dCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhEaXN0YW5jZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNob3dGZWVkYmFjayA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJQb2ludGVyRXZlbnRzX0luZm8uZGVjb2RlID0gZGVjb2RlO1xufSkoUEJQb2ludGVyRXZlbnRzX0luZm8g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7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJQb2ludGVyRXZlbnRzX0VudHJ5KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudFR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudEluZm8gPSBQQlBvaW50ZXJFdmVudHNfSW5mby5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c19FbnRyeS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJFdmVudHNfRW50cnkgfHwgKFBC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RlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS50aW1lc3RhbXAgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDApLnVpbnQzMihtZXNzYWdlLnRpbWVzdGFtcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYW5hbG9nICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNTMpLmZsb2F0KG1lc3NhZ2UuYW5hbG9nKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS50aWNrTnVtYmVyICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDU2KS51aW50MzIobWVzc2FnZS50aWNrTnVtYmVyKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlBvaW50ZXJFdmVudHNSZXN1bHQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlBvaW50ZXJFdmVudHNSZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJ1dHRvbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdCA9IFJheWNhc3RIaXQuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGF0ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbmFsb2cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c1Jlc3VsdC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJFdmVudHNSZXN1bHQgfHwgKFBCUG9pbnRlckV2ZW50c1Jlc3VsdCA9IHt9KSk7XG4iLCAiLyogZXNsaW50LWRpc2FibGUgKi9cbmltcG9ydCBfbTAgZnJvbSBcInByb3RvYnVmanMvbWluaW1hbFwiO1xuaW1wb3J0IHsgVmVjdG9yMyB9IGZyb20gXCIuLi8uLi8uLi9jb21tb24vdmVjdG9ycy5nZW5cIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLnNkay5jb21wb25lbnRzLmNvbW1vblwiO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVJheWNhc3RIaXQoKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgcG9zaXRpb246IHVuZGVmaW5lZCxcbiAgICAgICAgZ2xvYmFsT3JpZ2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wgd3JpdGVyLnVpbnQzMigzNCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5sZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDUpLmZsb2F0KG1lc3NhZ2UubGVuZ3RoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tZXNoTmFtZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDUwKS5zdHJpbmcobWVzc2FnZS5tZXNoTmFtZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZW50aXR5SWQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig1NikudWludDMyKG1lc3NhZ2UuZW50aXR5SWQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFJheWNhc3RIaXQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VSYXljYXN0SGl0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb24gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZ2xvYmFsT3JpZ2luID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpcmVjdGlvbiA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ub3JtYWxIaXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVuZ3RoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaE5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW50aXR5SWQgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUmF5Y2FzdEhpdC5kZWNvZGUgPSBkZWNvZGU7XG59KShSYXljYXN0SGl0IHx8IChSYXljYXN0SGl0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlBvaW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biAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzUG9pbnRlckxvY2tlZCA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJQb2ludGVyTG9jay5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJMb2NrIHx8IChQQlBvaW50ZXJMb2NrID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlBvaW50ZXJMb2NrIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvcG9pbnRlcl9sb2NrLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgUG9pbnRlckxvY2tTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDc0LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQlBvaW50ZXJMb2NrLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXR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JhbFRhcmdldFwiOlxuICAgICAgICAgICAgICAgIFZlY3RvcjMuZW5jb2RlKG1lc3NhZ2UuZGlyZWN0aW9uLmdsb2JhbFRhcmdldCwgd3JpdGVyLnVpbnQzMig1OCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJ0YXJnZXRFbnRpdHlcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDgwKS51aW50MzIobWVzc2FnZS5kaXJlY3Rpb24udGFyZ2V0RW50aXR5KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhEaXN0YW5jZSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5tYXhEaXN0YW5jZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucXVlcnlUeXBlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLnF1ZXJ5VHlwZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuY29udGludW91cyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDY0KS5ib29sKG1lc3NhZ2UuY29udGludW91cyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuY29sbGlzaW9uTWFzayAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDcyKS51aW50MzIobWVzc2FnZS5jb2xsaXNpb25NYXNrKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlJheWNhc3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlJheWNhc3QoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcmlnaW5PZmZzZXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJsb2NhbERpcmVjdGlvblwiLCBsb2NhbERpcmVjdGlvbjogVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJnbG9iYWxEaXJlY3Rpb25cIiwgZ2xvYmFsRGlyZWN0aW9uOiBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcImdsb2JhbFRhcmdldFwiLCBnbG9iYWxUYXJnZXQ6IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDEwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcInRhcmdldEVudGl0eVwiLCB0YXJnZXRFbnRpdHk6IHJlYWRlci51aW50MzIoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heERpc3RhbmNlID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucXVlcnlUeXBlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29udGludW91cyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29sbGlzaW9uTWFzayA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udG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hc3RSZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nbG9iYWxPcmlnaW4gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdHMucHVzaChSYXljYXN0SGl0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpY2tOdW1iZXIgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJSYXljYXN0UmVzdWx0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCUmF5Y2FzdFJlc3VsdCB8fCAoUEJSYXljYXN0UmVzdWx0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlJheWNhc3RSZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9yYXljYXN0X3Jlc3VsdC5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFJheWNhc3RSZXN1bHRTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDY4LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQlJheWNhc3RSZXN1bHQ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WludDMyKDEwKS5zdHJpbmcobWVzc2FnZS50ZXh0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mb250ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTYpLmludDMyKG1lc3NhZ2UuZm9udCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZm9udFNpemUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyOSkuZmxvYXQobWVzc2FnZS5mb250U2l6ZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZm9udEF1dG9TaXplICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzIpLmJvb2wobWVzc2FnZS5mb250QXV0b1NpemUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRleHRBbGlnbiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLnRleHRBbGlnbik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud2lkdGggIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig1MykuZmxvYXQobWVzc2FnZS53aWR0aCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNjEpLmZsb2F0KG1lc3NhZ2UuaGVpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wYWRkaW5nVG9wICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNjkpLmZsb2F0KG1lc3NhZ2UucGFkZGluZ1RvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYg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dFNoYXBlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUZXh0U2hhcGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnRBdXRvU2l6ZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nVG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1JpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxpbmVTcGFjaW5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5saW5lQ291bnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTEyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRXcmFwcGluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEyNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dCbHVyID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRYID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRZID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lV2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNoYWRvd0NvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTcwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVGV4dFNoYXBlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVGV4dFNoYXBlIHx8IChQQlRleHRTaGFwZSA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJUZXh0U2hhcGUgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy90ZXh0X3NoYXBlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVGV4dFNoYXBlU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTAzMCxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJUZXh0U2hhcGUuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3Q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ZHVyYXRpb24pO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmVhc2luZ0Z1bmN0aW9uICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE2KS5pbnQzMihtZXNzYWdlLmVhc2luZ0Z1bmN0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2UubW9kZT8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJtb3ZlXCI6XG4gICAgICAgICAgICAgICAgTW92ZS5lbmNvZGUobWVzc2FnZS5tb2RlLm1vdmUsIHdyaXRlci51aW50MzIoMjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwicm90YXRlXCI6XG4gICAgICAgICAgICAgICAgUm90YXRlLmVuY29kZShtZXNzYWdlLm1vZGUucm90YXRlLCB3cml0ZXIudWludDMyKDM0KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInNjYWxlXCI6XG4gICAgICAgICAgICAgICAgU2NhbGUuZW5jb2RlKG1lc3NhZ2UubW9kZS5zY2FsZSwgd3JpdGVyLnVpbnQzMig0MikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wbGF5aW5nICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDgpLmJvb2wobWVzc2FnZS5wbGF5aW5nKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5jdXJyZW50VGltZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDYxKS5mbG9hdChtZXNzYWdlLmN1cnJlbnRUaW1lKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlR3ZWVuLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUd2VlbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmR1cmF0aW9uID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZWFzaW5nRnVuY3Rpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0geyAkY2FzZTogXCJtb3ZlXCIsIG1vdmU6IE1vdmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSB7ICRjYXNlOiBcInJvdGF0ZVwiLCByb3RhdGU6IFJvdGF0ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kZSA9IHsgJGNhc2U6IFwic2NhbGVcIiwgc2NhbGU6IFNjYWxlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jdXJyZW50VGltZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVHdlZW4uZGVjb2RlID0gZGVjb2RlO1xufSkoUEJUd2VlbiB8fCAoUEJUd2VlbiA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlTW92ZSgpIHtcbiAgICByZXR1cm4geyBzdGFydDogdW5kZWZpbmVkLCBlbmQ6IHVuZGVmaW5lZCwgZmFjZURpcmVjdGlvbjogdW5kZWZpbmVkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBNb3ZlO1xuKGZ1bmN0aW9uIChNb3ZlKSB7XG4gICAgZnVuY3Rpb24gZW5jb2RlKG1lc3NhZ2UsIHdyaXRlciA9IF9tMC5Xcml0ZXIuY3JlYXRlKCkpIHtcbiAgICAgICAgaWYgKG1lc3NhZ2Uuc3RhcnQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgVmVjdG9yMy5lbmNvZGUobWVzc2FnZS5zdGFydCwgd3JpdGVyLnVpbnQzMigxMCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5lbmQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgVmVjdG9yMy5lbmNvZGUobWVzc2FnZS5lbmQsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmFjZURpcmVjdGlvbiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI0KS5ib29sKG1lc3NhZ2UuZmFjZURpcmVjdGlvbik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgTW92ZS5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZU1vdmUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGFydCA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmFjZURpcmVjdGlvbiA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgTW92ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShNb3ZlIHx8IChNb3ZlID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VSb3RhdGUoKSB7XG4gICAgcmV0dXJuIHsgc3RhcnQ6IHVuZGVmaW5lZCwgZW5kOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFJvdGF0ZTtcbihmdW5jdGlvbiAoUm90YXRlKSB7XG4gICAgZ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GJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3RhcnQgPSBRdWF0ZXJuaW9uLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW5kID0gUXVhdGVybmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFJvdGF0ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShSb3RhdGUgfHwgKFJvdGF0ZSA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlU2NhbGUoKSB7XG4gICAgcmV0dXJuIHsgc3RhcnQ6IHVuZGVmaW5lZCwgZW5kOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFNjYWxlO1xuKGZ1bmN0aW9uIChTY2FsZSkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnN0YXJ0ICE9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nVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgU2NhbGUuZGVjb2RlID0gZGVjb2RlO1xufSkoU2NhbGUgfHwgKFNjYWxlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlR3ZWVuIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdHdlZW4uZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBUd2VlblNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDExMDIsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCVHdlZW4uZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlK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gICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2VxdWVuY2UucHVzaChQQlR3ZWVuLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQlR3ZWVuU2VxdWVuY2UuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJUd2VlblNlcXVlbmNlIHx8IChQQlR3ZWVuU2VxdWVuY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCVHdlZW5TZXF1ZW5jZSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL3R3ZWVuX3NlcXVlbmNlLmdlbic7XG4vKipcbi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AgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlR3ZWVuU3RhdGUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlR3ZWVuU3RhdGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY3VycmVudFRpbWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoK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Zm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICB3cml0ZXIudWludDMyKDQyKS5mb3JrKCk7XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLnV2cykge1xuICAgICAgICAgICAgd3JpdGVyLmZsb2F0KHYpO1xuICAgICAgICB9XG4gICAgICAgIHdyaXRlci5sZGVsaW0oKTtcbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJVaUJhY2tncm91bmQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpQmFja2dyb3VuZCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHR1cmVNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZVNsaWNlcyA9IEJvcmRlclJlY3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2cy5wdXNoKHJlYWRlci5mbG9hdCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaUJhY2tncm91bmQuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJVaUJhY2tncm91bmQgfHwgKFBCVWlCYWNrZ3JvdW5kID0ge30pKTtcbiIsICIvKiBlc2xpbnQtZGlzYWJsZSAqL1xuaW1wb3J0IF9tMCBmcm9tIFwicHJvdG9idWZqcy9taW5pbWFsXCI7XG5jb25zdCBwcm90b2J1ZlBhY2thZ2VTYXJhc2EgPSBcImRlY2VudHJhbGFuZC5jb21tb25cIjtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VCb3JkZXJSZWN0KCkge1xuICAgIHJldHVybiB7IHRvcDogMCwgbGVmdDogMCwgcmlnaHQ6IDAsIGJvdHRvbTogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgQm9yZGVyUmVjdDtcbihmdW5jdGlvbiAoQm9yZGVyUmVjdCkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnRvcCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMykuZmxvYXQobWVzc2FnZS50b3ApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmxlZnQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UubGVmdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmlnaHQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2UucmlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmJvdHRvbSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5ib3R0b20pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIEJvcmRlclJlY3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VCb3JkZXJSZWN0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYm90dG9tID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiA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GVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VSZWN0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53aWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFJlY3QuZGVjb2RlID0gZGVjb2RlO1xufSkoUmVjdCB8fCAoUmVjdCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaUJhY2tncm91bmQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV9iYWNrZ3JvdW5kLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVWlCYWNrZ3JvdW5kU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA1MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaUJhY2tncm91bmQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTt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Y29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpQ2FudmFzSW5mb3JtYXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kZXZpY2VQaXhlbFJhdGlvID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgI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yA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hY2NlcHRFbXB0eSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1wdHlMYWJlbCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcHRpb25zLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zZWxlY3RlZEluZGV4ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlzYWJsZWQgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDExOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZ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gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpRHJvcGRvd25SZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duUmVzdWx0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlEcm9wZG93blJlc3VsdCB8fCAoUEJVaURyb3Bkb3duUmVzdWx0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlVpRHJvcGRvd25SZXN1bHQgfSBmcm9tICcuL3BiL2RlY2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bTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYWNlaG9sZGVyID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxhY2Vob2xkZXJDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc2FibGVkID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZm9udFNpemUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR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dW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE2KS5ib29sKG1lc3NhZ2UuaXNTdWJtaXQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVWlJbnB1dFJlc3VsdC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dFJlc3VsdCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzU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MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52YWx1ZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVWlUZXh0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlUZXh0IHx8IChQQlVpVGV4dCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaVRleHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV90ZXh0Lmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVWlUZXh0U2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA1MixcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaVRleHQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICA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KDQwKS5pbnQzMihtZXNzYWdlLmZsZXhXcmFwKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mbGV4U2hyaW5rICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNTMpLmZsb2F0KG1lc3NhZ2UuZmxleFNocmluayk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25UeXBlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDU2KS5pbnQzMihtZXNzYWdlLnBvc2l0aW9uVHlwZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYWxpZ25TZWxmICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDY0KS5pbnQzMihtZXNzYWdlLmFsaWduU2VsZik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleERpcmVjdGlvbiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig3MikuaW50MzIobWVzc2FnZS5mbGV4RGlyZWN0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5qdXN0aWZ5Q29udGVudCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS5qdXN0aWZ5Q29udGVudCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uub3ZlcmZsb3cgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODgpLmludDMyKG1lc3NhZ2Uub3ZlcmZsb3cpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmRpc3BsYXkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOTYpLmludDMyKG1lc3NhZ2UuZGlzcGxheSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDQpLmludDMyKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExNykuZmxvYXQobWVzc2FnZS5mbGV4QmFzaXMpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmZsZXhHcm93ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyNSkuZmxvYXQobWVzc2FnZS5mbGV4R3Jvdyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud2lkdGhVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyOCkuaW50MzIobWVzc2FnZS53aWR0aFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLndpZHRoICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE0MSkuZmxvYXQobWVzc2FnZS53aWR0aCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNDQpLmludDMyKG1lc3NhZ2UuaGVpZ2h0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE1NykuZmxvYXQobWVzc2FnZS5oZWlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbldpZHRoVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNjApLmludDMyKG1lc3NhZ2UubWluV2lkdGhVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5taW5XaWR0aCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNzMpLmZsb2F0KG1lc3NhZ2UubWluV2lkdGgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTc2KS5pbnQzMihtZXNzYWdlLm1pbkhlaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxODkpLmZsb2F0KG1lc3NhZ2UubWluSGVpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhXaWR0aFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTkyKS5pbnQzMihtZXNzYWdlLm1heFdpZHRoVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWF4V2lkdGggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjA1KS5mbG9hdChtZXNzYWdlLm1heFdpZHRoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIwOCkuaW50MzIobWVzc2FnZS5tYXhIZWlnaHRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjIxKS5mbG9hdChtZXNzYWdlLm1heEhlaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25MZWZ0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMjQpLmludDMyKG1lc3NhZ2UucG9zaXRpb25MZWZ0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25MZWZ0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIzNykuZmxvYXQobWVzc2FnZS5wb3NpdGlvbkxlZnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uVG9wVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNDApLmludDMyKG1lc3NhZ2UucG9zaXRpb25Ub3BVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wb3NpdGlvblRvcCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNTMpLmZsb2F0KG1lc3NhZ2UucG9zaXRpb25Ub3ApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uUmlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI1NikuaW50MzIobWVzc2FnZS5wb3NpdGlvblJpZ2h0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25SaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNjkpLmZsb2F0KG1lc3NhZ2UucG9zaXRpb25SaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25Cb3R0b21Vbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI3MikuaW50MzIobWVzc2FnZS5wb3NpdGlvbkJvdHRvbVVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uQm90dG9tICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI4NSkuZmxvYXQobWVzc2FnZS5wb3NpdGlvbkJvdHRvbSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luTGVmdFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjg4KS5pbnQzMihtZXNzYWdlLm1hcmdpbkxlZnRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5MZWZ0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwMSkuZmxvYXQobWVzc2FnZS5tYXJnaW5MZWZ0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3BVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwNCkuaW50MzIobWVzc2FnZS5tYXJnaW5Ub3BVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3AgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzE3KS5mbG9hdChtZXNzYWdlLm1hcmdpblRvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luUmlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMyMCkuaW50MzIobWVzc2FnZS5tYXJnaW5SaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1hcmdpblJpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMzMykuZmxvYXQobWVzc2FnZS5tYXJnaW5SaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luQm90dG9tVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzMzYpLmludDMyKG1lc3NhZ2UubWFyZ2luQm90dG9tVW5pdCk7XG4gICAg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WcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFyZW50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucmlnaHRPZiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduQ29udGVudCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduSXRlbXMgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4V3JhcCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhTaHJpbmsgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2NCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbGlnblNlbGYgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4RGlyZWN0aW9uID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmp1c3RpZnlDb250ZW50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm92ZXJmbG93ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc3BsYXkgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpc1VuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTE3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMjUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmxleEdyb3cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndpZHRoVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTQ0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNjApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluV2lkdGhVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE3Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5taW5XaWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNzYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxODkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE5Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhXaWR0aFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heFdpZHRoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIwOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblRvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25SaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjY5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjcyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uQm90dG9tVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyODUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Cb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkxlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5MZWZ0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzIwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpblJpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMzMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWFyZ2luUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzM2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQ5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNTIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM2NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNjgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1RvcFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0NzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0ODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzg0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzk3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDUwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0JvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJGaWx0ZXIgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IH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UudmlkZW9MZW5ndGgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnN0YXRlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLnN0YXRlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlZpZGVvRXZlbnQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlZpZGVvRXZlbnQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmN1cnJlbnRPZmZzZXQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aWRlb0xlbmd0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICA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ICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvbiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZvbHVtZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYXliYWNrUmF0ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVmlkZW9QbGF5ZXIuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJWaWRlb1BsYXllciB8fCAoUEJWaWRlb1BsYXllciA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJWaWRlb1BsYXllciB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL3ZpZGVvX3BsYXllci5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFZpZGVvUGxheWVyU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJWaWRlb1BsYXllci5lbmNvZGUodmFsdWUpO1xuICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgVWludDhBcnJheSh3cml0ZXIuZmluaXNoKCksIDAsIHdyaXRlci5sZW4pO1xuICAgICAgIC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52aXNpYmxlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuYm9vbChtZXNzYWdlLnZpc2libGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVmlzaWJpbGl0eUNvbXBvbmVudC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVmlzaWJpbGl0eUNvbXBvbmVudCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudmlzaWJsZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYW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bGlwQW5kQW5pbWF0b3IoZW50aXR5LCBjbGlwTmFtZSkge1xuICAgICAgICBjb25zdCBhbmltID0gdGhlQ29tcG9uZW50LmdldE11dGFibGVPck51bGwoZW50aXR5KTtcbiAgICAgICAgaWYgKCFhbmltKVxuICAgICAgICAgICAgcmV0dXJuIFtudWxsLCBudWxsXTtcbiAgICAgICAgY29uc3Qgc3RhdGUgPSBhbmltLnN0YXRlcy5maW5kKChpdGVtKSA9PiBpdGVtLmNsaXAgPT09IGNsaXBOYW1lKTtcbiAgICAgICAgaWYgKCFzdGF0ZSlcbiAgICAgICAgICAgIHJldHVybiBbYW5pbSwgbnVsbF07XG4gICAgICAgIHJldHVybiBbYW5pbSwgc3RhdGVdO1xuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50aGVDb21wb25lbnQsXG4gICAgICAgIGdldENsaXBPck51bGwoZW50aXR5LCBjbGlwTmFtZSkge1xuICAgICAgICAgICAgY29uc3QgW18sIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIHJldHVybiBzdGF0ZTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q2xpcChlbnRpdHksIGNsaXBOYW1lKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFRoZXJlIGlzIG5vIEFuaW1hdG9yIGZvdW5kIGluIHRoZSBlbnRpdHkgJHtlbnRpdHl9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIXN0YXRlKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgQW5pbWF0b3IgY29tcG9uZW50IG9mICR7ZW50aXR5fSBoYXMgbm8gdGhlIHN0YXRlICR7Y2xpcE5hbWV9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RhdGU7XG4gICAgICAgIH0sXG4gICAgICAgIHBsYXlTaW5nbGVBbmltYXRpb24oZW50aXR5LCBjbGlwTmFtZSwgc2hvdWxkUmVzZXQgPSB0cnVlKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IgfHwgIXN0YXRlKVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIC8vIFJlc2V0IGFsbCBvdGhlciBhbmltYXRpb25zXG4gICAgICAgICAgICBmb3IgKGNvbnN0IHN0YXRlIG9mIGFuaW1hdG9yLnN0YXRlcykge1xuICAgICAgICAgICAgICAgIHN0YXRlLnBsYXlpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBzdGF0ZS5zaG91bGRSZXNldCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzdGF0ZS5wbGF5aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gc2hvdWxkUmVzZXQ7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfSxcbiAgICAgICAgc3RvcEFsbEFuaW1hdGlvbnMoZW50aXR5LCByZXNldEN1cnNvciA9IHRydWUpIHtcbiAgICAgICAgICAgIC8vIEdldCB0aGUgbXV0YWJsZSB0byBtb2RpZnlpbmdcbiAgICAgICAgICAgIGNvbnN0IGFuaW1hdG9yID0gdGhlQ29tcG9uZW50LmdldE11dGFibGVPck51bGwoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgLy8gUmVzZXQgYWxsIG90aGVyIGFuaW1hdGlvbnNcbiAgICAgICAgICAgIGZvciAoY29uc3Qgc3RhdGUgb2YgYW5pbWF0b3Iuc3RhdGVzKSB7XG4gICAgICAgICAgICAgICAgc3RhdGUucGxheWluZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gcmVzZXRDdXJzb3I7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWF0ZXJpYWwgfSBmcm9tICcuLi9nZW5lcmF0ZWQvaW5kZXguZ2VuJztcbmNvbnN0IFRleHR1cmVIZWxwZXIgPSB7XG4gICAgQ29tbW9uKHRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAndGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgQXZhdGFyKGF2YXRhclRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAnYXZhdGFyVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgYXZhdGFyVGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgVmlkZW8odmlkZW9UZXh0dXJlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0ZXg6IHtcbiAgICAgICAgICAgICAgICAkY2FzZTogJ3ZpZGVvVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdmlkZW9UZXh0dXJlXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVNYXRlcmlhbENvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBNYXRlcmlhbChlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgVGV4dHVyZTogVGV4dHVyZUhlbHBlcixcbiAgICAgICAgc2V0QmFzaWNNYXRlcmlhbChlbnRpdHksIG1hdGVyaWFsKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1hdGVyaWFsOiB7XG4gICAgICAgICAgICAgICAgICAgICRjYXNlOiAndW5saXQnLFxuICAgICAgICAgICAgICAgICAgICB1bmxpdDogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGJyTWF0ZXJpYWwoZW50aXR5LCBtYXRlcmlhbCkge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtYXRlcmlhbDoge1xuICAgICAgICAgICAgICAgICAgICAkY2FzZTogJ3BicicsXG4gICAgICAgICAgICAgICAgICAgIHBicjogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWVzaENvbGxpZGVyIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5leHBvcnQgZnVuY3Rpb24gZGVmaW5lTWVzaENvbGxpZGVyQ29tcG9uZW50KGVuZ2luZSkge1xuICAgIGNvbnN0IHRoZUNvbXBvbmVudCA9IE1lc2hDb2xsaWRlcihlbmdpbmUpO1xuICAgIGZ1bmN0aW9uIGdldENvbGxpc2lvbk1hc2sobGF5ZXJzKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxheWVycykpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnMubWFwKChpdGVtKSA9PiBpdGVtKS5yZWR1Y2UoKHByZXYsIGl0ZW0pID0+IHByZXYgfCBpdGVtLCAwKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChsYXllcnMpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnM7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLi4udGhlQ29tcG9uZW50LFxuICAgICAgICBzZXRCb3goZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAnYm94JywgYm94OiB7fSB9LFxuICAgICAgICAgICAgICAgIGNvbGxpc2lvbk1hc2s6IGdldENvbGxpc2lvbk1hc2soY29sbGlkZXJMYXllcnMpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGxhbmUoZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAncGxhbmUnLCBwbGFuZToge30gfSxcbiAgICAgICAgICAgICAgICBjb2xsaXNpb25NYXNrOiBnZXRDb2xsaXNpb25NYXNrKGNvbGxpZGVyTGF5ZXJzKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldEN5bGluZGVyKGVudGl0eSwgcmFkaXVzQm90dG9tLCByYWRpdXNUb3AsIGNvbGxpZGVyTGF5ZXJzKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNh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ZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAncGxhbmUnLCBwbGFuZTogeyB1dnM6IHV2cyB8fCBbXSB9IH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBzZXRDeWxpbmRlcihlbnRpdHksIHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdjeWxpbmRlcicsIGN5bGluZGVyOiB7IHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wIH0gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldFNwaGVyZShlbnRpdHkpIHtcbiAgICAgICAgICAgIHRoZUNvbXBvbmVudC5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB7XG4gICAgICAgICAgICAgICAgbWVzaDogeyAkY2FzZTogJ3NwaGVyZScsIHNwaGVyZToge30gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFR3ZWVuIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5jb25zdCBUd2VlbkhlbHBlciA9IHtcbiAgICBNb3ZlKG1vdmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICRjYXNlOiAnbW92ZScsXG4gICAgICAgICAgICBtb3ZlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBSb3RhdGUocm90YXRlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3JvdGF0ZScsXG4gICAgICAgICAgICByb3RhdGVcbiAgICAgICAgfTtcbiAgICB9LFxuICAgIFNjYWxlKHNjYWxlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3NjYWxlJyxcbiAgICAgICAgICAgIHNjYWxlXG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVUd2VlbkNvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBUd2VlbihlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgTW9kZTogVHdlZW5IZWxwZXJcbiAgICB9O1xufVxuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJQXJyYXkgPSAodHlwZSkgPT4ge1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgYnVpbGRlci53cml0ZVVpbnQzMih2YWx1ZS5sZW5ndGgpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpdGVtIG9mIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdHlwZS5zZXJpYWxpemUoaXRlbSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3QXJyYXkgPSBbXTtcbiAgICAgICAgICAgIGNvbnN0IGxlbmd0aCA9IHJlYWRlci5yZWFkVWludDMyKCk7XG4gICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgbGVuZ3RoOyBpbmRleCsrKSB7XG4gICAgICAgICAgICAgICAgbmV3QXJyYXkucHVzaCh0eXBlLmRlc2VyaWFsaXplKHJlYWRlcikpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld0FycmF5O1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgICBpdGVtczogdHlwZS5qc29uU2NoZW1hLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdhcnJheSdcbiAgICAgICAgfVxuICAgIH07XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBCb29sID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50OCh2YWx1ZSA/IDEgOiAwKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQ4KCkgPT09IDE7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2Jvb2xlYW4nLFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2Jvb2xlYW4nXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSW50NjQgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ2NChCaWdJbnQodmFsdWUpKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gTnVtYmVyKHJlYWRlci5yZWFkSW50NjQoKSk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnaW50NjQnXG4gICAgfVxufTtcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJbnQzMiA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUludDMyKHZhbHVlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQzMigpO1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4gMDtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2ludGVnZXInLFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2ludDMyJ1xuICAgIH1cbn07XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IGNvbnN0IEludDE2ID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50MTYodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDE2KCk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnaW50MTYnXG4gICAgfVxufTtcbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgY29uc3QgSW50OCA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUludDgodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDgoKTtcbiAgICB9LFxuICAg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bGl6ZShyZWFkZXIpIHtcbiAgICAgICAgcmV0dXJuIHJlYWRlci5yZWFkRmxvYXQ2NCgpO1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4gMC4wO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnbnVtYmVyJyxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdmbG9hdDY0J1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IENvbG9yM1NjaGVtYSA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUucik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLmcpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS5iKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcjogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICBnOiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIGI6IHJlYWRlci5yZWFkRmxvYXQzMigpXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiB7IHI6IDAsIGc6IDAsIGI6IDAgfTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgIHI6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgIGc6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgIGI6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICB9LFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2NvbG9yMydcbiAgICB9XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBDb2xvcjRTY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLnIpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS5nKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUuYik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLmEpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByOiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIGc6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgYjogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICBhOiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyByOiAwLCBnOiAwLCBiOiAwLCBhOiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICByOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBnOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBiOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBhOiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdjb2xvcjQnXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgRW50aXR5U2NoZW1hID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50MzIodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDMyKCk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnZW50aXR5J1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFF1YXRlcm5pb25TY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLngpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS55KTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUueik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLncpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB4OiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIHk6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgejogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICB3OiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1c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AgICAgICAgICB4OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB6OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB3OiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICd2ZWN0b3IzJ1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IElNYXAgPSAoc3BlYywgZGVmYXVsdFZhbHVlKSA9PiB7XG4gICAgY29uc3Qgc3BlY1JlZmxlY3Rpb24gPSBPYmplY3Qua2V5cyhzcGVjKS5yZWR1Y2UoKHNwZWNSZWZsZWN0aW9uLCBjdXJyZW50S2V5KSA9PiB7XG4gICAgICAgIHNwZWNSZWZsZWN0aW9uW2N1cnJlbnRLZXldID0gc3BlY1tjdXJyZW50S2V5XS5qc29uU2NoZW1hO1xuICAgICAgICByZXR1cm4gc3BlY1JlZmxlY3Rpb247XG4gICAgfSwge30pO1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIHNwZWNba2V5XS5zZXJpYWxpemUodmFsdWVba2V5XSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSB7fTtcbiAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIHNwZWMpIHtcbiAgICAgICAgICAgICAgICA7XG4gICAgICAgICAgICAgICAgbmV3VmFsdWVba2V5XSA9IHNwZWNba2V5XS5kZXNlcmlhbGl6ZShyZWFkZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld1ZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSB9O1xuICAgICAgICB9LFxuICAgICAgICBleHRlbmQ6IChiYXNlKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSwgLi4uYmFzZSB9O1xuICAgICAgICB9LFxuICAgICAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgICAgIHByb3BlcnRpZXM6IHNwZWNSZWZsZWN0aW9uLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdtYXAnXG4gICAgICAgIH1cbiAgICB9O1xufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSU9wdGlvbmFsID0gKHNwZWMpID0+IHtcbiAgICByZXR1cm4ge1xuICAgICAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDEpO1xuICAgICAgICAgICAgICAgIHNwZWMuc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBkZXNlcmlhbGl6ZShyZWFkZXIpIHtcbiAgICAgICAgICAgIGNvbnN0IGV4aXN0cyA9IHJlYWRlci5yZWFkSW50OCgpO1xuICAgICAgICAgICAgaWYgKGV4aXN0cykge1xuICAgICAgICAgICAgICAgIHJldHVybiBzcGVjLmRlc2VyaWFsaXplKHJlYWRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNyZWF0ZSgpIHtcbiAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6IHNwZWMuanNvblNjaGVtYS50eXBlLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdvcHRpb25hbCcsXG4gICAgICAgICAgICBvcHRpb25hbEpzb25TY2hlbWE6IHNwZWMuanNvblNjaGVtYVxuICAgICAgICB9XG4gICAgfTtcbn07XG4iLCAiZXhwb3J0IGNvbnN0IElPbmVPZiA9IChzcGVjcykgPT4ge1xuICAgIGNvbnN0IHNwZWNLZXlzID0gT2JqZWN0LmtleXMoc3BlY3MpO1xuICAgIGNvbnN0IGtleVRvSW5kZXggPSBzcGVjS2V5cy5yZWR1Y2UoKGRpY3QsIGtleSwgaW5kZXgpID0+IHtcbiAgICAgICAgZGljdFtrZXldID0gaW5kZXg7XG4gICAgICAgIHJldHVybiBkaWN0O1xuICAgIH0sIHt9KTtcbiAgICBjb25zdCBzcGVjUmVmbGVjdGlvbiA9IHNwZWNLZXlzLnJlZHVjZSgoc3BlY1JlZmxlY3Rpb24sIGN1cnJlbnRLZXkpID0+IHtcbiAgICAgICAgc3BlY1JlZmxlY3Rpb25bY3VycmVudEtleV0gPSBzcGVjc1tjdXJyZW50S2V5XS5qc29uU2NoZW1hO1xuICAgICAgICByZXR1cm4gc3BlY1JlZmxlY3Rpb247XG4gICAgfSwge30pO1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh7ICRjYXNlLCB2YWx1ZSB9LCBidWlsZGVyKSB7XG4gICAgICAgICAgICBjb25zdCBfdmFsdWUgPSBrZXlUb0luZGV4WyRjYXNlLnRvU3RyaW5nKCldICsgMTtcbiAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVVaW50OChfdmFsdWUpO1xuICAgICAgICAgICAgc3BlY3NbJGNhc2VdLnNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcik7XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgJGNhc2UgPSBzcGVjS2V5c1tyZWFkZXIucmVhZEludDgoKSAtIDFdO1xuICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBzcGVjc1skY2FzZV0uZGVzZXJpYWxpemUocmVhZGVyKTtcbiAgICAgICAgICAgIHJldHVybiB7ICRjYXNlLCB2YWx1ZSB9O1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgcHJvcGVydGllczogc3BlY1JlZmxlY3Rpb24sXG4gICAgICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ29uZS1vZidcbiAgICAgICAgfVxuICAgIH07XG59O1xuIiwgImV4cG9ydCBjb25zdCBpc1NjaGVtYVR5cGUgPSAodmFsdWUsIHR5cGVzKSA9PiB0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nNvblNjaGVtYSkpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ2FycmF5Jykge1xuICAgICAgICBjb25zdCB3aXRoSXRlbXNKc29uU2NoZW1hID0ganNvblNjaGVtYTtcbiAgICAgICAgcmV0dXJuIElBcnJheShqc29uU2NoZW1hVG9TY2hlbWEod2l0aEl0ZW1zSnNvblNjaGVtYS5pdGVtcykpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ2VudW0taW50Jykge1xuICAgICAgICBjb25zdCBlbnVtSnNvblNjaGVtYSA9IGpzb25TY2hlbWE7XG4gICAgICAgIHJldHVybiBJbnRFbnVtKGVudW1Kc29uU2NoZW1hLmVudW1PYmplY3QsIGVudW1Kc29uU2NoZW1hLmRlZmF1bHQpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ2VudW0tc3RyaW5nJykge1xuICAgICAgICBjb25zdCBlbnVtSnNvblNjaGVtYSA9IGpzb25TY2hlbWE7XG4gICAgICAgIHJldHVybiBTdHJpbmdFbnVtKGVudW1Kc29uU2NoZW1hLmVudW1PYmplY3QsIGVudW1Kc29uU2NoZW1hLmRlZmF1bHQpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ29uZS1vZicpIHtcbiAgICAgICAgY29uc3Qgb25lT2ZKc29uU2NoZW1hID0ganNvblNjaGVtYTtcbiAgICAgICAgY29uc3Qgc3BlYyA9IHt9O1xuICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBvbmVPZkpzb25TY2hlbWEucHJvcGVydGllcykge1xuICAgICAgICAgICAgc3BlY1trZXldID0ganNvblNjaGVtYVRvU2NoZW1hKG9uZU9mSnNvblNjaGVtYS5wcm9wZXJ0aWVzW2tleV0pO1xuICAgICAgICB9XG4g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HZhbHVlLnNjYWxlLnkpO1xuICAgICAgICBidWlsZGVyLnNldEZsb2F0MzIocHRyICsgMzYsIHZhbHVlLnNjYWxlLnopO1xuICAgICAgICBidWlsZGVyLnNldFVpbnQzMihwdHIgKyA0MCwgdmFsdWUucGFyZW50IHx8IDApO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIGNvbnN0IHB0ciA9IHJlYWRlci5pbmNyZW1lbnRSZWFkT2Zmc2V0KFRSQU5TRk9STV9MRU5HVEgpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIpLFxuICAgICAgICAgICAgICAgIHk6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDQpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDgpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcm90YXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAxMiksXG4gICAgICAgICAgICAgICAgeTogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMTYpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDIwKSxcbiAgICAgICAgICAgICAgICB3OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAyNClcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHg6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDI4KSxcbiAgICAgICAgICAgICAgICB5OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAzMiksXG4gICAgICAgICAgICAgICAgejogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMzYpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcGFyZW50OiByZWFkZXIuZ2V0VWludDMyKHB0ciArIDQwKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcG9zaXRpb246IHsgeDogMCwgeTogMCwgejogMCB9LFxuICAgICAgICAgICAgc2NhbGU6IHsgeDogMSwgeTogMSwgejogMSB9LFxuICAgICAgICAgICAgcm90YXRpb246IHsgeDogMCwgeTogMCwgejogMCwgdzogMSB9LFxuICAgICAgICAgICAgcGFyZW50OiAwXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBleHRlbmQodmFsdWUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHBvc2l0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAgfSxcbiAgICAgICAgICAgIHNjYWxlOiB7IHg6IDEsIHk6IDEsIHo6IDEgfSxcbiAgICAgICAgICAgIHJvdGF0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAsIHc6IDEgfSxcbiAgICAgICAgICAgIHBhcmVudDogMCxcbiAgICAgICAgICAgIC4uLnZhbHVlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByb3RhdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgICAgICAgICAgdzogeyB0eXBlOiAnbnVtYmVyJyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHBhcmVudDogeyB0eXBlOiAnaW50ZWdlcicgfVxuICAgICAgICB9LFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ3RyYW5zZm9ybSdcbiAgICB9XG59O1xuZXhwb3J0IGZ1bmN0aW9uIGRlZmluZVRyYW5zZm9ybUNvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0cmFuc2Zvcm1EZWYgPSBlbmdpbmUuZGVmaW5lQ29tcG9uZW50RnJvbVNjaGVtYSgnY29yZTo6VHJhbnNmb3JtJywgVHJhbnNmb3JtU2NoZW1hKTtcbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50cmFuc2Zvcm1EZWYsXG4gICAgICAgIGNyZWF0ZShlbnRpdHksIHZhbCkge1xuICAgICAgICAgICAgcmV0dXJuIHRyYW5zZm9ybURlZi5jcmVhdGUoZW50aXR5LCB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JvY2Vzcy5lbnY/Lk5PREVfRU5WID09PSAnZGV2ZWxvcG1lbnQnKSkgfHxcbiAgICBmYWxzZTtcbmV4cG9ydCBmdW5jdGlvbiBjaGVja05vdFRoZW5hYmxlKHQsIGVycm9yKSB7XG4gICAgaWYgKF9fREVWX18pIHtcbiAgICAgICAgaWYgKHQgJiYgdHlwZW9mIHQgPT09ICdvYmplY3QnICYmIHR5cGVvZiB0LnRoZW4gPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihlcnJvcik7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHQ7XG59XG4iLCAiLyoqXG4gKlxuICogQHJldHVybnMgYSBuZXcgR1NldFxuICovXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlVmVyc2lvbkdTZXQoKSB7XG4gICAgY29uc3QgbGFzdFZlcnNpb24gPSBuZXcgTWFwKCk7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSBudW1iZXJcbiAgICAgICAgICogQHBhcmFtIHZlcnNpb25cbiAgICAgICAgICogQHJldHVybnNcbiAgICAgICAgICovXG4gICAgICAgIGFkZFRvKG51bWJlciwgdmVyc2lvbikge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgIGlmICh2ZXJzaW9uIDwgMCkge1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgY3VycmVudFZhbHVlID0gbGFzdFZlcnNpb24uZ2V0KG51bWJlcik7XG4gICAgICAgICAgICAvLyBJZiB0aGUgdmVyc2lvbiBpcyA+PSwgaXQgbWVhbnMgdGhlIHZhbHVlIGl0J3MgYWxyZWFkeSBpbiB0aGUgc2V0XG4gICAgICAgICAgICBpZiAoY3VycmVudFZhbHVlICE9PSB1bmRlZmluZWQgJiYgY3VycmVudFZhbHVlID49IHZlcnNpb24pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxhc3RWZXJzaW9uLnNldChudW1iZXIsIHZlcnNpb24pO1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAcmV0dXJucyB0aGUgc2V0IHdpdGggW251bWJlciwgdmVyc2lvbl0gb2YgZWFjaCB2YWx1ZVxuICAgICAgICAgKi9cbiAgICAgICAgaGFzKG4sIHYpIHtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRWYWx1ZSA9IGxhc3RWZXJzaW9uLmdldChuKTtcbiAgICAgICAgICAgIC8vIElmIHRoZSB2ZXJzaW9uIGlzID49LCBpdCBtZWFucyB0aGUgdmFsdWUgaXQncyBhbHJlYWR5IGluIHRoZSBzZXRcbiAgICAgICAgICAgIGlmIChjdXJyZW50VmFsdWUgIT09IHVuZGVmaW5lZCAmJiBjdXJyZW50VmFsdWUgPj0gdikge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9LFxuICAgICAgICAvKipcbiAgICAgICAgICogV2FybmluZzogdGhpcyBmdW5jdGlvbiByZXR1cm5zIHRoZSByZWZlcmVuY2UgdG8gdGhlIGludGVybmFsIG1hcCxcbiAgICAgICAgICogIGlmIHlvdSBuZWVkIHRvIG11dGF0ZSBzb21lIHZhbHVlLCBtYWtlIGEgY29weS5cbiAgICAgICAgICogRm9yIG9wdGltaXphdGlvbiBwdXJwb3NlIHRoZSBjb3B5IGlzbid0IG1hZGUgaGVyZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgdGhlIG1hcCBvZiBud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udGVyKys7XG4gICAgICAgIGNvbnN0IGVudGl0eVZlcnNpb24gPSByZW1vdmVkRW50aXRpZXMuZ2V0TWFwKCkuaGFzKGVudGl0eU51bWJlcilcbiAgICAgICAgICAgID8gcmVtb3ZlZEVudGl0aWVzLmdldE1hcCgpLmdldChlbnRpdHlOdW1iZXIpICsgMVxuICAgICAgICAgICAgOiAwO1xuICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKGVudGl0eU51bWJlciwgZW50aXR5VmVyc2lvbik7XG4gICAgICAgIGlmICh1c2VkRW50aXRpZXMuaGFzKGVudGl0eSkpIHtcbiAgICAgICAgICAgIHJldHVybiBnZW5lcmF0ZU5ld0VudGl0eSgpO1xuICAgICAgICB9XG4gICAgICAgIHVzZWRFbnRpdGllcy5hZGQoZW50aXR5KTtcbiAgICAgICAgcmV0dXJuIGVudGl0eTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ2VuZXJhdGVFbnRpdHkobmV0d29ya2VkKSB7XG4gICAgICAgIGlmIChuZXR3b3JrZWQgJiYgIW5ldHdvcmtlZEVudGl0aWVzUmFuZ2UpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTmV0d29yayBlbnRpdGllcyByYW5nZWQgbm90IGluaXRpYWxpemVkLiBDb25uZWN0IHRvIGEgQ1JEVCBTZXJ2ZXInKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB1c2VkTmV0d29ya1NpemUgPSAobmV0d29ya2VkRW50aXRpZXNSYW5nZSAmJlxuICAgICAgICAgICAgWy4uLnVzZWRFbnRpdGllcy52YWx1ZXMoKV0uZmlsdGVyKCgkKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgW2VudGl0eUlkXSA9IEVudGl0eVV0aWxzLmZyb21FbnRpdHlJZCgkKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW50aXR5SWQgPj0gbmV0d29ya2VkRW50aXRpZXNSYW5nZVswXSAmJiB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tYmVyID4gbmV0d29ya2VkRW50aXRpZXNSYW5nZVsxXSkpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGlmICghbmV0d29ya2VkICYmIG51bWJlciA+PSBsb2NhbEVudGl0aWVzQXZhaWxhYmxlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKG51bWJlciwgdmVyc2lvbiArIDEpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBlbnRpdHkgaXMgbm90IGJlaW5nIHVzZWQsIHdlIGNhbiByZS11c2UgaXRcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGUgZW50aXR5IHdhcyByZW1vdmVkIGluIHRoaXMgdGljaywgd2UncmUgbm90IGNvdW50aW5nIGZvciB0aGUgdXNlZEVudGl0aWVzLCBidXQgd2UgaGF2ZSBpdCBpbiB0aGUgdG9SZW1vdmVFbnRpdHlBcnJheVxuICAgICAgICAgICAgICAgIGlmICghdXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpICYmICF0b1JlbW92ZUVudGl0aWVzLmluY2x1ZGVzKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdXNlZEVudGl0aWVzLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW50aXR5O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ2VuZXJhdGVOZXdFbnRpdHkobmV0d29ya2VkKTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlRW50aXR5KGVudGl0eSkge1xuICAgICAgICBpZiAoZW50aXR5IDwgUkVTRVJWRURfU1RBVElDX0VOVElUSUVTKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICBpZiAodXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICB1c2VkRW50aXRpZXMuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICB0b1JlbW92ZUVudGl0aWVzLnB1c2goZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHVwZGF0ZVJlbW92ZWRFbnRpdHkoZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVsZWFzZVJlbW92ZWRFbnRpdGllcygpIHtcbiAgICAgICAgY29uc3QgYXJyID0gdG9SZW1vdmVFbnRpdGllcztcbiAgICAgICAgaWYgKGFyci5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRvUmVtb3ZlRW50aXRpZXMgPSBbXTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgZW50aXR5IG9mIGFycikge1xuICAgICAgICAgICAgICAgIGNvbnN0IFtuLCB2XSA9IEVudGl0eVV0aWxzLmZyb21FbnRpdHlJZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgIHJlbW92ZWRFbnRpdGllcy5hZGRUbyhuLCB2KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYXJyO1xuICAgIH1cbiAgICBmdW5jdGlvbiB1cGRhdGVSZW1vdmVkRW50aXR5KGVudGl0eSkge1xuICAgICAgICBjb25zdCBbbiwgdl0gPSBFbnRpdHlVdGlscy5mcm9tRW50aXR5SWQoZW50aXR5KTtcbiAgICAgICAgLy8gVXBkYXRlIHRoZSByZW1vdmVkIGVudGl0aWVzIG1hcFxuICAgICAgICByZW1vdmVkRW50aXRpZXMuYWRkVG8obiwgdik7XG4gICAgICAgIC8vIFJlbW92ZSB0aGUgdXNlZEVudGl0aWVzIGlmIGV4aXN0XG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDw9IHY7IGkrKykge1xuICAgICAgICAgICAgdXNlZEVudGl0aWVz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WZmZXIuY3VycmVudFJlYWRPZmZzZXQoKTtcbiAgICAgICAgICAgICAgICBsZXQgbWVzc2FnZSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfQ09NUE9ORU5UKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBEZWxldGVDb21wb25lbnQucmVhZChidWZmZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChoZWFkZXIudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlRfTkVUV09SSykge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gRGVsZXRlQ29tcG9uZW50TmV0d29yay5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCkge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gUHV0Q29tcG9uZW50T3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UX05FVFdPUkspIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IFB1dE5ldHdvcmtDb21wb25lbnRPcGVyYXRpb24ucmVhZChidWZmZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChoZWFkZXIudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9FTlRJVFkpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IERlbGV0ZUVudGl0eS5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0VOVElUWV9ORVRXT1JLKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBEZWxldGVFbnRpdHlOZXR3b3JrLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IEFwcGVuZFZhbHVlT3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gVW5rbm93biBtZXNzYWdlLCB3ZSBza2lwIGl0XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBjb25zdW1lIHRoZSBtZXNzYWdlXG4gICAgICAgICAgICAgICAgICAgIGJ1ZmZlci5pbmNyZW1lbnRSZWFkT2Zmc2V0KGhlYWRlci5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAobWVzc2FnZSkge1xuICAgICAgICAgICAgICAgICAgICByZWNlaXZlZE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zcG9ydElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZUJ1ZmZlcjogYnVmZmVyLmJ1ZmZlcigpLnN1YmFycmF5KG9mZnNldCwgYnVmZmVyLmN1cnJlbnRSZWFkT2Zmc2V0KCkpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgIC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m5ldHdvcmtJZCB9O1xuICAgICAgICAgICAgICAgIE5ldHdvcmtFbnRpdHkuY3JlYXRlT3JSZXBsYWNlKGVudGl0eUlkLCBuZXR3b3JrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtc2cudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9FTlRJVFkgfHwgbXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfRU5USVRZX05FVFdPUkspIHtcbiAgICAgICAgICAgICAgICBlbnRpdGllc1Nob3VsZEJlQ2xlYW5lZC5wdXNoKGVudGl0eUlkKTtcbiAgICAgICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHlTdGF0ZSA9IGVuZ2luZS5lbnRpdHlDb250YWluZXIuZ2V0RW50aXR5U3RhdGUoZW50aXR5SWQpO1xuICAgICAgICAgICAgICAgIC8vIFNraXAgdXBkYXRlcyBmcm9tIHJlbW92ZWQgZW50aXR5ZXNcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIC8vIEVudGl0aWVzIHdpdGggdW5rbm93biBlbnRpdGllcyBzaG91bGQgdXBkYXRlIGl0cyBlbnRpdHkgc3RhdGVcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlVua25vd24pIHtcbiAgICAgICAgICAgICAgICAgICAgZW5naW5lLmVudGl0eUNvbnRhaW5lci51cGRhdGVVc2VkRW50aXR5KGVudGl0eUlkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZW5naW5lLmdldENvbXBvbmVudE9yTnVsbChtc2cuY29tcG9uZW50SWQpO1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQuY29tcG9uZW50SWQgPT09IFRyYW5zZm9ybS5jb21wb25lbnRJZCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgTmV0d29ya0VudGl0eS5oYXMoZW50aXR5SWQpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBOZXR3b3JrUGFyZW50LmhhcyhlbnRpdHlJZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1zZy5kYXRhID0gbmV0d29ya1V0aWxzLmZpeFRyYW5zZm9ybVBhcmVudChtc2cpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IFtjb25mbGljdE1lc3NhZ2UsIHZhbHVlXSA9IGNvbXBvbmVudC51cGRhdGVGcm9tQ3JkdCh7IC4uLm1zZywgZW50aXR5SWQgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY29uZmxpY3RNZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBBZGQgbWVzc2FnZSB0byB0cmFuc3BvcnQgcXVldWUgdG8gYmUgcHJvY2Vzc2VkIGJ5IG90aGVycyB0cmFuc3BvcnRzXG4gICAgICAgICAgICAgICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBvblByb2Nlc3NFbnRpdHlDb21wb25lbnRDaGFuZ2UgJiYgb25Qcm9jZXNzRW50aXR5Q29tcG9uZW50Q2hhbmdlKG1zZy5lbnRpdHlJZCwgbXNnLnR5cGUsIGNvbXBvbmVudCwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiB0ZXN0IHRoaXMgbGluZSwgaXQgaXMgZnVuZGFtbWVudGFsIHRvIG1ha2UgdGhlIGVkaXRvciB3b3JrXG4gICAgICAgICAgICAgICAgICAgIGJyb2FkY2FzdE1lc3NhZ2VzLnB1c2gobXNnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gdGhlIGxhc3Qgc3RhZ2Ugb2YgdGhlIHN5bmNyaG9uaXphdGlvbiBpcyB0byBkZWxldGUgdGhlIGVudGl0aWVzXG4gICAgICAgIGZvciAoY29uc3QgZW50aXR5IG9mIGVudGl0aWVzU2hvdWxkQmVDbGVhbmVkKSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGRlZmluaXRpb24gb2YgZW5naW5lLmNvbXBvbmVudHNJdGVyKCkpIHtcbiAgICAgICAgICAgICAgICAvLyBUT0RPOiBjaGVjayB0aGlzIHdpdGggcGF0by9wcmF2dXNcbiAgICAgICAgICAgICAgICBkZWZpbml0aW9uLmVudGl0eURlbGV0ZWQoZW50aXR5LCB0cnVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVuZ2luZS5lbnRpdHlDb250YWluZXIudXBkYXRlUmVtb3ZlZEVudGl0eShlbnRpdHkpO1xuICAgICAgICAgICAgb25Qcm9jZXNzRW50aXR5Q29tcG9uZW50Q2hhbmdlICYmIG9uUHJvY2Vzc0VudGl0eUNvbXBvbmVudENoYW5nZShlbnRpdHksIENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfRU5USVRZKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICAvKipcbiAgICAgKiBJdGVyYXRlcyB0aGUgZGlydHkgbWFwI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lJZCwgbWVzc2FnZS50aW1lc3RhbXAsIG1lc3NhZ2UuY29tcG9uZW50SWQsIG1lc3NhZ2UuZGF0YSwgYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfQ09NUE9ORU5UKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBEZWxldGVDb21wb25lbnQud3JpdGUobWVzc2FnZS5lbnRpdHlJZCwgY29tcG9uZW50LmNvbXBvbmVudElkLCBtZXNzYWdlLnRpbWVzdGFtcCwgYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIEFwcGVuZFZhbHVlT3BlcmF0aW9uLndyaXRlKG1lc3NhZ2UuZW50aXR5SWQsIG1lc3NhZ2UudGltZXN0YW1wLCBtZXNzYWdlLmNvbXBvbmVudElkLCBtZXNzYWdlLmRhdGEsIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY3JkdE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VCdWZmZXI6IGJ1ZmZlci5idWZmZXIoKS5zdWJhcnJheShvZmZzZXQsIGJ1ZmZlci5jdXJyZW50V3JpdGVPZmZzZXQoKSlcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvblByb2Nlc3NFbnRpdHlDb21wb25lbnRDaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhd1ZhbHVlID0gbWVzc2FnZS50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCB8fCBtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGNvbXBvbmVudC5nZXQobWVzc2FnZS5lbnRpdHlJZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uUHJvY2Vzc0VudGl0eUNvbXBvbmVudENoYW5nZShtZXNzYWdlLmVudGl0eUlkLCBtZXNzYWdlLnR5cGUsIGNvbXBvbmVudCwgcmF3VmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIEFmdGVyIGFsbCB1cGRhdGVzLCBJIGV4ZWN1dGUgdGhlIERlbGV0ZWRFbnRpdHkgbWVzc2FnZXNcbiAgICAgICAgZm9yIChjb25zdCBlbnRpdHlJZCBvZiBlbnRpdGllc0RlbGV0ZWRUaGlzVGljaykge1xuICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gYnVmZmVyLmN1cnJlbnRXcml0ZU9mZnNldCgpO1xuICAgICAgICAgICAgRGVsZXRlRW50aXR5LndyaXRlKGVudGl0eUlkLCBidWZmZXIpO1xuICAgICAgICAgICAgY3JkdE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgIHR5cGU6IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfRU5USVRZLFxuICAgICAgICAgICAgICAgIGVudGl0eUlkLFxuICAgICAgICAgICAgICAgIG1lc3NhZ2VCdWZmZXI6IGJ1ZmZlci5idWZmZXIoKS5zdWJhcnJheShvZmZzZXQsIGJ1ZmZlci5jdXJyZW50V3JpdGVPZmZzZXQoKSlcbiAgICAgICAgICAgIH0pO1xuICAg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pZiAobWVzc2FnZS50cmFuc3BvcnRJZCA9PT0gdHJhbnNwb3J0SW5kZXgpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIC8vIFJlZHVuZGFudCBtZXNzYWdlIGZvciB0aGUgdHJhbnNwb3J0XG4gICAgICAgICAgICAgICAgaWYgKCF0cmFuc3BvcnQuZmlsdGVyKG1lc3NhZ2UpKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCB7IGVudGl0eUlkIH0gPSBmaW5kTmV0d29ya0lkKG1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zZm9ybU5lZWRzRml4ID0gJ2NvbXBvbmVudElkJyBpbiBtZXNzYWdlICYmXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29tcG9uZW50SWQgPT09IFRyYW5zZm9ybS5jb21wb25lbnRJZCAmJlxuICAgICAgICAgICAgICAgICAgICBUcmFuc2Zvcm0uaGFzKGVudGl0eUlkKSAmJlxuICAgICAgICAgICAgICAgICAgICBOZXR3b3JrUGFyZW50LmhhcyhlbnRpdHlJZCkgJiZcbiAgICAgICAgICAgICAgICAgICAgTmV0d29ya0VudGl0eS5oYXMoZW50aXR5SWQpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZXJlIHdhcyBhIExPQ0FMIGNoYW5nZSBpbiB0aGUgdHJhbnNmb3JtLiBBZGQgdGhlIHBhcmVudCB0byB0aGF0IHRyYW5zZm9ybVxuICAgICAgICAgICAgICAgIGlmIChpc1JlbmRlcmVyVHJhbnNwb3J0ICYmIG1lc3NhZ2UudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLlBVVF9DT01QT05FTlQgJiYgdHJhbnNmb3JtTmVlZHNGaXgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFyZW50ID0gZmluZE5ldHdvcmtJZChOZXR3b3JrUGFyZW50LmdldCh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ZXN0YW1wcy5zZXQoZW50aXR5LCBtc2cudGltZXN0YW1wKTtcbiAgICAgICAgICAgICAgICBpZiAobXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UIHx8IG1zZy50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVF9ORVRXT1JLKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGJ1ZiA9IG5ldyBSZWFkV3JpdGVCeXRlQnVmZmVyKG1zZy5kYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5zZXQoZW50aXR5LCBzY2hlbWEuZGVzZXJpYWxpemUoYnVmKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBkYXRhLmRlbGV0ZShlbnRpdHkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gW251bGwsIGRhdGEuZ2V0KGVudGl0eSldO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBQcm9jZXNzTWVzc2FnZVJlc3VsdFR5cGUuU3RhdGVPdXRkYXRlZFRpbWVzdGFtcDpcbiAgICAgICAgICAgIGNhc2UgUHJvY2Vzc01lc3NhZ2VSZXN1bHRUeXBlLlN0YXRlT3V0ZGF0ZWREYXRhOiB7XG4gICAgICAgICAgICAgICAgaWYgKGRhdGEuaGFzKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgd3JpdGVCdWZmZXIgPSBuZXcgUmVhZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgICAgICBzY2hlbWEuc2VyaWFsaXplKGRhdGEuZ2V0KGVudGl0eSksIHdyaXRlQnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiB3cml0ZUJ1ZmZlci50b0JpbmFyeSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudGl0eUlkOiBlbnRpdHksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiB0aW1lc3RhbXBzLmdldChlbnRpdHkpXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogdGltZXN0YW1wcy5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gW251bGwsIGRhdGEuZ2V0KGVudGl0eSldO1xuICAgIH07XG59XG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlR2V0Q3JkdE1lc3NhZ2VzRm9yTHd3KGNvbXBvbmVudElkLCB0aW1lc3RhbXBzLCBkaXJ0eUl0ZXJhdG9yLCBzY2hlbWEsIGRhdGEpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24qICgpIHtcbiAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VGltZXN0YW1wID0gaW5jcmVtZW50VGltZXN0YW1wKGVudGl0eSwgdGltZXN0YW1wcyk7XG4gICAgICAgICAgICBpZiAoZGF0YS5oYXMoZW50aXR5KSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHdyaXRlQnVmZmVyID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgICAgICBzY2hlbWEuc2VyaWFsaXplKGRhdGEuZ2V0KGVudGl0eSksIHdyaXRlQnVmZmVyKTtcbiAgICAgICAgICAgICAgICBjb25zdCBtc2cgPSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5ULFxuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgZW50aXR5SWQ6IGVudGl0eSxcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogd3JpdGVCdWZmZXIudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiBuZXdUaW1lc3RhbXBcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHlpZWxkIG1zZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IG1zZyA9IHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlQsXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudElkLFxuICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICB0aW1lc3RhbXA6IG5ld1RpbWVzdGFtcFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgeWllbGQgbXNnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGRpcnR5SXRlcmF0b3IuY2xlYXIoKTtcbiAgICB9O1xufVxuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGNyZWF0ZUNvbXBvbmVudERlZmluaXRpb25Gcm9tU2NoZW1hKGNvbXBvbmVudE5hbWUsIGNvbXBvbmVudElkLCBzY2hlbWEpIHtcbiAgICBjb25zdCBkYXRhID0gbmV3IE1hcCgpO1xuICAgIGNvbnN0IGRpcnR5SXRlcmF0b3IgPSBuZXcgU2V0KCk7XG4gICAgY29uc3QgdGltZXN0YW1wcyA9IG5ldyBNYXAoKTtcbiAgICByZXR1cm4ge1xuICAgICAgICBnZXQgY29tcG9uZW50SWQoKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50SWQ7XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBjb21wb25lbnROYW1lKCkge1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudE5hbWU7XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBjb21wb25lbnRUeXBlKCkge1xuICAgICAgICAgICAgLy8gYSBnZXR0ZXIgaXMgdXNlZCBoZXJlIHRvIHByZXZlbnQgYWNjaWRlbnRhbCBjaGFuZ2VzXG4gICAgICAgICAgICByZXR1cm4gMCAvKiBDb21wb25lbnRUeXBlLkxhc3RXcml0ZVdpbkVsZW1lbnRTZXQgKi87XG4gICAgICAgIH0sXG4gICAgICAgIHNjaGVtYSxcbiAgICAgICAgaGFzKGVudGl0eSkge1xuICAgICAgICAgICAgcmV0dXJuIGRhdGEuaGFzKGVudGl0eSk7XG4gICAgICAgIH0sXG4gICAgICAgIGRlbGV0ZUZyb20oZW50aXR5LCBtYXJrQXNEaXJ0eSA9IHRydWUpIHtcbiAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudCA9IGRhdGEuZ2V0KGVudGl0eSk7XG4gICAgICAgICAgICBpZiAoZGF0YS5kZWxldGUoZW50aXR5KSAmJiBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50IHx8IG51bGw7XG4gICAgICAgIH0sXG4gICAgICAgIGVudGl0eURlbGV0ZWQoZW50aXR5LCBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgaWYgKGRhdGEuZGVsZXRlKGVudGl0eSkgJiYgbWFya0FzRGlydHkpIHtcbiAgICAgICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRPck51bGwoZW50aXR5KSB7XG4gICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBkYXRhLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudCA/IGRlZXBSZWFkb25seShjb21wb25lbnQpIDogbnVsbDtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0KGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbZ2V0RnJvbV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yIGVudGl0eSAjJHtlbnRpdHl9IG5vdCBmb3VuZGApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGRlZXBSZWFkb25seShjb21wb25lbnQpO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGU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21wb25lbnQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICB9LFxuICAgICAgICBnZXRPckNyZWF0ZU11dGFibGUoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3JlYXRlKGVudGl0eSwgdmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZGlydHlJdGVyYXRvci5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRNdXRhYmxlKGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gdGhpcy5nZXRNdXRhYmxlT3JOdWxsKGVudGl0eSk7XG4gICAgICAgICAgICBpZiAoY29tcG9uZW50ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbbXV0YWJsZV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yICR7ZW50aXR5fSBub3QgZm91bmRgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBjb21wb25lbnQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29tcG9uZW50XSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgW2VudGl0eSwgY29tcG9uZW50XTtcbiAgICAgICAgICAgIH1c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4gICAgY29uc3QgZGF0YSA9IG5ldyBNYXAoKTtcbiAgICBjb25zdCBkaXJ0eUl0ZXJhdG9yID0gbmV3IFNldCgpO1xuICAgIGNvbnN0IHF1ZXVlZENvbW1hbmRzID0gW107XG4gICAgLy8gb25seSBzb3J0IHRoZSBhcnJheSBpZiB0aGUgbGF0ZXN0IChOKSBlbGVtZW50IGhhcyBhIHRpbWVzdGFtcCA8PSBOLTFcbiAgICBmdW5jdGlvbiBzaG91bGRTb3J0KHJvdykge1xuICAgICAgICBjb25zdCBsZW4gPSByb3cucmF3Lmxlbmd0aDtcbiAgICAgICAgaWYgKGxlbiA+IDEgJiYgcm93LnJhd1tsZW4gLSAxXS50aW1lc3RhbXAgPD0gcm93LnJhd1tsZW4gLSAyXS50aW1lc3RhbXApIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ290VXBkYXRlZChlbnRpdHkpIHtcbiAgICAgICAgY29uc3Qgcm93ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgaWYgKHJvdykge1xuICAgICAgICAgICAgaWYgKHNob3VsZFNvcnQocm93KSkge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc29ydChzb3J0QnlUaW1lc3RhbXApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgd2hpbGUgKHJvdy5yYXcubGVuZ3RoID4gb3B0aW9ucy5tYXhFbGVtZW50cykge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc2hpZnQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGZyb3plblNldCA9IGZyZWV6ZVNldChuZXcgU2V0KHJvdz8ucmF3Lm1hcCgoJCkgPT4gJC52YWx1ZSkpKTtcbiAgICAgICAgICAgIHJvdy5mcm96ZW5TZXQgPSBmc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zdCByZXQgPSB7XG4gICAgICAgIGdldCBjb21wb25lbnRJZCgpIHtcbiAgICAgICAgICAgIHJldHVybiBjb21wb25lbnRJZDtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0IGNvbXBvbmVudE5hbWUoKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50TmFtZTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0IGNvbXBvbmVudFR5cGUoKSB7XG4gICAgICAgICAgICAvLyBhIGdldHRlciBpcyB1c2VkIGhlcmUgdG8gcHJldmVudCBhY2NpZGVudGFsIGNoYW5nZXNcbiAgICAgICAgICAgIHJldHVybiAxIC8qIENvbXBvbmVudFR5cGUuR3Jvd09ubHlWYWx1ZVNldCAqLztcbiAgICAgICAgfSxcbiAgICAgICAgc2NoZW1hLFxuICAgICAgICBoYXMoZW50aXR5KSB7XG4gICAgICAgICAgICByZXR1cm4gZGF0YS5oYXMoZW50aXR5KTtcbiAgICAgICAgfSxcbiAgICAgICAgZW50aXR5RGVsZXRlZChlbnRpdHkpIHtcbiAgICAgICAgICAgIGRhdGEuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgIH0sXG4gICAgICAgIGdldChlbnRpdHkpIHtcbiAgICAgICAgICAgIGNvbnN0IHZhbHVlcyA9IGRhdGEuZ2V0KGVudGl0eSk7XG4gICAgICAgICAgICBpZiAodmFsdWVzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlcy5mcm96ZW5TZXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW1wdHlSZWFkb25seVNldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgYWRkVmFsdWUoZW50aXR5LCByYXdWYWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgeyBzZXQsIHZhbHVlIH0gPSBhcHBlbmQoZW50aXR5LCByYXdWYWx1ZSk7XG4gICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgIHNjaGVtYS5zZXJpYWxpemUodmFsdWUsIGJ1Zik7XG4gICAgICAgICAgICBxdWV1ZWRDb21tYW5kcy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICBkYXRhOiBidWYudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogMCxcbiAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuQVBQRU5EX1ZBTFVFXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBzZXQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29tcG9uZW50XSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgW2VudGl0eSwgY29tcG9uZW50LmZyb3plblNldF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgICpkaXJ0eUl0ZXJhdG9yKCkge1xuICAgICAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgICAgIHlpZWxkIGVudGl0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q3JkdFVwZGF0ZXMoKSB7XG4gICAgICAgICAgICAvLyByZXR1cm4gYSBjb3B5IG9mIHRoZSBjb21tYW5kcywgYW5kIHRoZW4gY2xlYXIgdGhlIGxvY2FsIGNvcHlcbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuY2xlYXIoKTtcbiAgICAgICAgICAgIHJldHVybiBxdWV1ZWRDb21tYW5kcy5zcGxpY2UoMCwgcXVldWVkQ29tbWFuZHMubGVuZ3RoKTtcbiAgICAgICAgfSxcbiAgICAgICAgdXBkYXRlRnJvbUNyZHQoX2JvZHkpIHtcbiAgICAgICAgICAgIGlmIChfYm9keS50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuQVBQRU5EX1ZBTFVFKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoX2JvZHkuZGF0YSk7XG4gICAgICAgICAgICAgICAgYXBwZW5kKF9ib2R5LmVudGl0eUlkLCBzY2hlbWEuZGVzZXJpYWxpemUoYnVmKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW251bGwsIHVuZGVmaW5lZF07XG4gICAgICAgIH0sXG4gICAgICAgIGR1bXBDcmR0U3RhdGVUb0J1ZmZlcjogZnVuY3Rpb24gKGJ1ZmZlciwgZmlsdGVyRW50aXR5KSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IFtlbnRpdHksIHsgcmF3IH1dIG9mIGRhdGEpIHtcbiAgICAgICAgICAgICAgICBpZiAoZmlsdGVyRW50aXR5ICYmICFmaWx0ZXJFbnRpdHkoZW50aXR5KSlcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBpdCBvZiByYXcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgc2NoZW1hLnNlcmlhbGl6ZShpdC52YWx1ZSwgYnVmKTtcbiAgICAgICAgICAgICAgICAgICAgQXBwZW5kVmFsdWVPcGVyYXRpb24ud3JpdGUoZW50aXR5LCAwLCBjb21wb25lbnRJZCwgYnVmLnRvQmluYXJ5KCksIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfV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9yIChsZXQgaSA9IGFycmF5Q29tbWFuZHMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgICAgICAgICBjb25zdCBjb21tYW5kID0gYXJyYXlDb21tYW5kc1tpXTtcbiAgICAgICAgICAgICAgICBpZiAoY29tbWFuZC50aW1lc3RhbXAgPiBtYXhUaW1lc3RhbXApIHtcbiAgICAgICAgICAgICAgICAgICAgbWF4VGltZXN0YW1wID0gY29tbWFuZC50aW1lc3RhbXA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjb21tYW5kLnRpbWVzdGFtcCA+IGdsb2JhbFN0YXRlLnByZXZpb3VzRnJhbWVNYXhUaW1lc3RhbXApIHtcbiAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUudGhpc0ZyYW1lQ29tbWFuZHMucHVzaChjb21tYW5kKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8gfHwgY29tbWFuZC5zdGF0ZSA9PT0gMSAvKiBQb2ludGVyRXZlbnRUeXBlLlBFVF9ET1dOICovKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZXZDb21tYW5kID0gZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuZ2V0KGNvbW1hbmQuYnV0dG9uKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFwcmV2Q29tbWFuZCB8fCBjb21tYW5kLnRpbWVzdGFtcCA+IHByZXZDb21tYW5kLnRpbWVzdGFtcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuc2V0KGNvbW1hbmQuYnV0dG9uLCBjb21tYW5kKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAg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KGlucHV0QWN0aW9uLCBlbnRpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3QgaW5wdXQgb2YgSW5wdXRDb21tYW5kcykge1xuICAgICAgICAgICAgY29uc3QgY21kID0gZmluZENsaWNrKGlucHV0LCBlbnRpdHkpO1xuICAgICAgICAgICAgaWYgKGNtZClcbiAgICAgICAgICAgICAgICByZXR1cm4gY21kO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgICBmdW5jdGlvbiBmaW5kQ2xpY2soaW5wdXRBY3Rpb24sIGVudGl0eSkge1xuICAgICAgICBsZXQgZG93biA9IG51bGw7XG4gICAgICAgIGxldCB1cCA9IG51bGw7XG4gICAgICAgIC8vIFdlIHNlYXJjaCB0aGUgbGFzdCBVUCAmIERPV04gY29tbWFuZCBzb3J0ZWQgYnkgdGltZXN0YW1wIGRlc2NlbmRpbmdcbiAgICAgICAgZm9yIChjb25zdCBpdCBvZiBmaW5kQ29tbWFuZHNCeUFjdGlvbkRlc2NlbmRpbmcoaW5wdXRBY3Rpb24sIGVudGl0eSkpIHtcbiAgICAgICAgICAgIGlmICghdXApIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgdXAgPSBpdDtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoIWRvd24pIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDEgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfRE9XTiAqLykge1xuICAgICAgICAgICAgICAgICAgICBkb3duID0gaXQ7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVx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IChlbnRpdHkpIHtcbiAgICAgICAgICAgIHJldHVybiBnZXRJbnB1dENvbW1hbmRGcm9tRW50aXR5KGlucHV0QWN0aW9uLCBwb2ludGVyRXZlbnRUeXBlLCBlbnRpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZm9yIChjb25zdCBjb21tYW5kIG9mIGdsb2JhbFN0YXRlLnRoaXNGcmFtZUNvbW1hbmRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKChjb21tYW5kLmJ1dHRvbiA9PT0gaW5wdXRBY3Rpb24gfHwgaW5wdXRBY3Rpb24gPT09IDMgLyogSW5wdXRBY3Rpb24uSUFfQU5ZICovKSAmJlxuICAgICAgICAgICAgICAgICAgICBjb21tYW5kLnN0YXRlID09PSBwb2ludGVyRXZlbnRUeXBlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjb21tYW5kO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIGZpbmRJbnB1dENvbW1hbmQoaW5wdXRBY3Rpb24sIHBvaW50ZXJFdmVudFR5cGUsIGVudGl0eSkge1xuICAgICAgICAvLyBXZSBzZWFyY2ggdGhlIGxhc3QgcG9pbnRlciBFdmVudCBjb21tYW5kIHNvcnRlZCBieSB0aW1lc3RhbXBcbiAgICAgICAgY29uc3QgY29tbWFuZCA9IGZpbmRMYXN0QWN0aW9uKHBvaW50ZXJFdmVudFR5cGUsIGlucHV0QWN0aW9uLCBlbnRpdHkpO1xuICAgICAgICBpZiAoIWNvbW1hbmQpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgaWYgKHRpbWVzdGFtcElzQ3VycmVudEZyYW1lKGNvbW1hbmQudGltZXN0YW1wKSkge1xuICAgICAgICAgICAgcmV0dXJuIGNvbW1hbmQ7XG4gICAgICAgIH1cbiAgICA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KHByZXYpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50IG51bWJlciAke2NvbXBvbmVudElkfSB3YXMgYWxyZWFkeSByZWdpc3RlcmVkLmApO1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChjb21wb25lbnQuY29tcG9uZW50TmFtZSAhPT0gY29tcG9uZW50TmFtZSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBDb21wb25lbnQgbmFtZSBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50TmFtZSAke2NvbXBvbmVudE5hbWV9ICE9ICR7Y29tcG9uZW50LmNvbXBvbmVudE5hbWV9YCk7XG4gICAgICAgIH1cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgKGNvbXBvbmVudC5jb21wb25lbnRJZCAhPT0gY29tcG9uZW50SWQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50IG51bWJlciBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50SWQgJHtjb21wb25lbnRJZH0gIT0gJHtjb21wb25lbnQuY29tcG9uZW50SWR9YCk7XG4gICAgICAgIH1cbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBjb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hKGNvbXBvbmVudE5hbWUsIHNjaGVtYSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudE5hbWUpO1xuICAgICAgICBjb25zdCBwcmV2ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKHByZXYpIHtcbiAgICAgICAgICAgIC8vIFRPRE86IGFzc2VydCBzcGVjID09PSBwcmV2LnNwZWNcbiAgICAgICAgICAgIHJldHVybiBwcmV2O1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChzZWFsZWQpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0VuZ2luZSBpcyBhbHJlYWR5IHNlYWxlZC4gTm8gY29tcG9uZW50cyBjYW4gYmUgYWRkZWQgYXQgdGhpcyBzdGFnZScpO1xuICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSBjcmVhdGVDb21wb25lbnREZWZpbml0aW9uRnJvbVNjaGVtYShjb21wb25lbnROYW1lLCBjb21wb25lbnRJZCwgc2NoZW1hKTtcbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBuZXdDb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gbmV3Q29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEoY29tcG9uZW50TmFtZSwgc2NoZW1hLCBvcHRpb25zKSB7XG4gICAgICAgIGNvbnN0IGNvbXBvbmVudElkID0gY29tcG9uZW50TnVtYmVyRnJvbU5hbWUoY29tcG9uZW50TmFtZSk7XG4gICAgICAgIGNvbnN0IHByZXYgPSBjb21wb25lbnRzRGVmaW5pdGlvbi5nZXQoY29tcG9uZW50SWQpO1xuICAgICAgICBpZiAocHJldikge1xuICAgICAgICAgICAgLy8gVE9ETzogYXNzZXJ0IHNwZWMgPT09IHByZXYuc3BlY1xuICAgICAgICAgICAgcmV0dXJuIHByZXY7XG4gICAgICAgIH1cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgK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29uc3QgZGVmID0gY3JlYXRlQ29tcG9uZW50RGVmaW5pdGlvbkZyb21TY2hlbWEoY29tcG9uZW50TmFtZSwgY29tcG9uZW50SWQsIHNjaGVtYVNwZWMpO1xuICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSB7XG4gICAgICAgICAgICAuLi5kZWYsXG4gICAgICAgICAgICBjcmVhdGUoZW50aXR5LCB2YWwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVmLmNyZWF0ZShlbnRpdHksIHZhbCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgdmFsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlZi5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBjb21wb25lbnRzRGVmaW5pdGlvbi5zZXQoY29tcG9uZW50SWQsIG5ld0NvbXBvbmVudCk7XG4gICAgICAgIHJldHVybiBuZXdDb21wb25lbnQ7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdldENvbXBvbmVudChjb21wb25lbnRJZE9yTmFtZSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IHR5cGVvZiBjb21wb25lbnRJZE9yTmFtZSA9PT0gJ251bWJlcicgPyBjb21wb25lbnRJZE9yTmFtZSA6IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudElkT3JOYW1lKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKCFjb21wb25lbnQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50ICR7Y29tcG9uZW50SWRPck5hbWV9IG5vdCBmb3VuZC4gWW91IG5lZWQgdG8gZGVjbGFyZSB0aGUgY29tcG9uZW50cyBhdCB0aGU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VxuICAgICAgICAgICAgICAgIHJldHVybiBlbnRpdHk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGZ1bmN0aW9uKiBnZXRDb21wb25lbnREZWZHcm91cCguLi5hcmdzKSB7XG4gICAgICAgIGNvbnN0IFtmaXJzdENvbXBvbmVudERlZiwgLi4uY29tcG9uZW50RGVmaW5pdGlvbnNdID0gYXJncztcbiAgICAgICAgZm9yIChjb25zdCBbZW50aXR5XSBvZiBmaXJzdENvbXBvbmVudERlZi5pdGVyYXRvcigpKSB7XG4gICAgICAgICAgICBsZXQgbWF0Y2hlcyA9IHRydWU7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGNvbXBvbmVudERlZiBvZiBjb21wb25lbnREZWZpbml0aW9ucykge1xuICAgICAgICAgICAgICAgIGlmICghY29tcG9uZW50RGVmLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoZXMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1hdGNoZXMpIHtcbiAgICAgICAgICAgICAgICB5aWVsZCBbZW50aXR5LCAuLi5hcmdzXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBnZXRTeXN0ZW1zKCkge1xuICAgICAgICByZXR1cm4gc3lzdGVtcy5nZXRTeXN0ZW1zKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGNvbXBvbmVudHNJdGVyKCkge1xuICAgICAgICByZXR1cm4gY29tcG9uZW50c0RlZmluaXRpb24udmFsdWVzKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZUNvbXBvbmVudERlZmluaXRpb24oY29tcG9uZW50SWRPck5hbWUpIHtcbiAgICAgICAgaWYgKHNlYWxlZClcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRW5naW5lIGlzIGFscmVhZHkgc2VhbGVkLiBObyBjb21wb25lbnRzIGNhbiBiZSByZW1vdmVkIGF0IHRoaXMgc3RhZ2UnKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50SWQgPSB0eXBlb2YgY29tcG9uZW50SWRPck5hbWUgPT09ICdudW1iZXInID8gY29tcG9uZW50SWRPck5hbWUgOiBjb21wb25lbnROdW1iZXJGcm9tTmFtZShjb21wb25lbnRJZE9yTmFtZSk7XG4gICAgICAgIGNvbXBvbmVudHNEZWZpbml0aW9uLmRlbGV0ZShjb21wb25lbnRJZCk7XG4gICAgfVxuICAgIGNvbXBvbmVudHMuVHJhbnNmb3JtKHsgZGVmaW5lQ29tcG9uZW50RnJvbVNjaGVtYSB9KTtcbiAgICBmdW5jdGlvbiBzZWFsKCkge1xuICAgICAgICBpZiAoIXNlYWxlZCkge1xuICAgICAgICAgICAgc2VhbGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICBhZGRFbnRpdHksXG4gICAgICAgIHJlbW92ZUVudGl0eSxcbiAgICAgICAgcmVtb3ZlRW50aXR5V2l0aENoaWxkcmVuLFxuICAgICAgICBhZGRTeXN0ZW0sXG4gICAgICAgIGdldFN5c3RlbXMsXG4gICAgICAgIHJlbW92ZVN5c3RlbSxcbiAgICAgICAgZGVmaW5lQ29tcG9uZW50LFxuICAgICAgICBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hLFxuICAgICAgICBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEsXG4gICAgICAgIGdldEVudGl0aWVzV2l0aCxcbiAgICAgICAgZ2V0Q29tcG9uZW50LFxuICAgICAgICBnZXRDb21wb25lbnRPck51bGw6IGdldENvbXBvbmVudE9yTnVsbCxcbiAgICAgICAgZ2V0RW50aXR5T3JOdWxsQnlOYW1lLFxuICAgICAgICByZW1vdmVDb21wb25lbnREZWZpbml0aW9uL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eXBlOiB0eXBlLFxuICAgICAgICAgICAgICAgIGV2ZW50SW5mbzoge1xuICAgICAgICAgICAgICAgICAgICBidXR0b246IG9wdHMuYnV0dG9uLFxuICAgICAgICAgICAgICAgICAgICBzaG93RmVlZGJhY2s6IG9wdHMuc2hvd0ZlZWRiYWNrLFxuICAgICAgICAgICAgICAgICAgICBob3ZlclRleHQ6IG9wdHMuaG92ZXJUZXh0LFxuICAgICAgICAgICAgICAgICAgICBtYXhEaXN0YW5jZTogb3B0cy5tYXhEaXN0YW5jZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZVBvaW50ZXJFdmVudChlbnRpdHksIHR5cGUsIGJ1dHRvbikge1xuICAgICAgICBjb25zdCBwb2ludGVyRXZlbnQgPSBQb2ludGVyRXZlbnRzLmdldE11dGFibGVPck51bGwoZW50aXR5KTtcbiAgICAgICAgaWYgKCFwb2ludGVyRXZlbnQpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIHBvaW50ZXJFdmVudC5wb2ludGVyRXZlbnRzID0gcG9pbnRlckV2ZW50LnBvaW50ZXJFdmVudHMuZmlsdGVyKChwb2ludGVyKSA9PiAhKHBvaW50ZXIuZXZlbnRJbmZvPy5idXR0b24gPT09IGJ1dHRvbiAmJiBwb2ludGVyLmV2ZW50VHlwZSA9PT0gdHlwZSkpO1xuICAgIH1cbiAgICBmdW5jdGlvbiBnZXRQb2ludGVyRXZlbnQoZXZlbnRUeXBlKSB7XG4gICAgICAgIGlmIChldmVudFR5cGUgPT09IEV2ZW50VHlwZS5VcCkge1xuICAgICAgICAgICAgcmV0dXJuIDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi87XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIDEgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfRE9XTiAqLztcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlRXZlbnQoZW50aXR5LCB0eXBlKSB7XG4gICAgICAgIGNvbnN0IGV2ZW50ID0gZ2V0RXZlbnQoZW50aXR5KTtcbiAgICAgICAgY29uc3QgcG9pbnRlckV2ZW50ID0gZXZlbnQuZ2V0KHR5cGUpO1xuICAgICAgICBpZiAocG9pbnRlckV2ZW50Py5vcHRzLmhvdmVyVGV4dCkge1xuICAgICAgICAgICAgcmVtb3ZlUG9pbnRlckV2ZW50KGVudGl0eSwgZ2V0UG9pbnRlckV2ZW50KHR5cGUpLCBwb2ludGVyRXZlbnQub3B0cy5idXR0b24pO1xuICAgICAgICB9XG4gICAgICAgIGV2ZW50LmRlbGV0ZSh0eXBlKTtcbiAgICB9XG4gICAgLy8gQGludGVybmFsXG4gICAgZW5naW5lLmFkZFN5c3RlbShmdW5jdGlvbiBFdmVudFN5c3RlbSgpIHtcbiAgICAgICAgZm9yIChjb25zdCBbZW50aXR5LCBldmVudF0gb2YgZXZlbnRzTWFwKSB7XG4gICAgICAgICAgICBpZiAoZW5naW5lLmdldEVudGl0eVN0YXRlKGVudGl0eSkgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpIHtcbiAgICAgICAgICAgICAgICBldmVudHNNYXAuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKGNvbnN0IFtldmVudFR5cGUsIHsgY2IsIG9wdHMgfV0gb2YgZXZlbnQpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuQ2xpY2spIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29tbWFuZCA9IGlucHV0U3lzdGVtLmdldENsaWNrKG9wdHMuYnV0dG9uLCBlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWFuZClcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZC51cCksICdDbGljayBldmVudCByZXR1cm5lZCBhIHRoZW5hYmxlLiBPbmx5IHN5bmNocm9ub3VzIGZ1bmN0aW9ucyBhcmUgYWxsb3dlZCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuRG93biB8fCBldmVudFR5cGUgPT09IEV2ZW50VHlwZS5VcCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21tYW5kID0gaW5wdXRTeXN0ZW0uZ2V0SW5wdXRDb21tYW5kKG9wdHMuYnV0dG9uLCBnZXRQb2ludGVyRXZlbnQoZXZlbnRUeXBlKSwgZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZCksICdFdmVudCBoYW5kbGVyIHJldHVybmVkIGEgdGhlbmFibGUuIE9ubHkgc3luY2hyb25vdXMgZnVuY3Rpb25zIGFyZSBhbGxvd2VkJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBjb25zdCBvblBvaW50ZXJEb3duID0gKC4uLmFyZ3MpID0+IHtcbiAgICAgICAgY29uc3QgW2RhdGEsIGNiLCBtYXliZU9wdHNdID0gYXJncztcbiAgICAgICAgaWYgKHR5cGVvZiBkYXRhID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgcmV0dXJuIG9uUG9pbnRlckRvd24oeyBlbnRpdHk6IGRhdGEsIG9wdHM6IG1heWJlT3B0cyA/PyB7fSB9LCBjYik7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgeyBlbnRpdHksIG9wdHMgfSA9IGRhdGE7XG4gICAgICAgIGNvbnN0IG9wdGlvbnMgPSBnZXREZWZhdWx0T3B0cyhvcHRzKTtcbiAg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tKCgpID0+IHtcbiAgICAgICAgZm9yIChjb25zdCByZXN0YXJ0IG9mIHJlc3RhcnRUd2VlbnMpIHtcbiAgICAgICAgICAgIHJlc3RhcnQoKTtcbiAgICAgICAgfVxuICAgICAgICByZXN0YXJ0VHdlZW5zLmxlbmd0aCA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgdHdlZW5dIG9mIGVuZ2luZS5nZXRFbnRpdGllc1dpdGgoVHdlZW4pKSB7XG4gICAgICAgICAgICBpZiAodHdlZW5DaGFuZ2VkKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgUmVhZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgIFR3ZWVuLnNjaGVtYS5zZXJpYWxpemUodHdlZW4sIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgY2FjaGUuc2V0KGVudGl0eSwge1xuICAgICAgICAgICAgICAgICAgICB0d2VlbjogYnVmZmVyLnRvQmluYXJ5KCksXG4gICAgICAgICAgICAgICAgICAgIGZyYW1lczogMCxcbiAgICAgICAgICAgICAgICAgICAgY29tcGxldGVkOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgY2hhbmdlZDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgdHdlZW5DYWNoZSA9IGNhY2hlLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgdHdlZW5DYWNoZS5mcmFtZXMgKz0gMTtcbiAgICAgICAgICAgIHR3ZWVuQ2FjaGUuY2hhbmdlZCA9IGZhbHNlO1xuICAgICAgICAgICAgaWYgKGlzQ29tcGxldGVkKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAvLyBSZXNldCB0d2VlbiBmcmFtZXMuXG4gICAgICAgICAgICAgICAgdHdlZW5DYWNoZS5mcmFtZXMgPSAwO1xuICAgICAgICAgICAgICAgIC8vIHNldCB0aGUgdHdlZW4gY29tcGxldGVkIHRvIGF2b2lkIGNhbGxpbmcgdGhpcyBhZ2FpbiBmb3IgdGhlIHNhbWUgdHdlZW5cbiAgICAgICAgICAgICAgICB0d2VlbkNhY2hlLmNvbXBsZXRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgY29uc3QgdHdlZW5TZXF1ZW5jZSA9IFR3ZWVuU2VxdWVuY2UuZ2V0T3JOdWxsKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgaWYgKCF0d2VlblNlcXVlbmNlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCB7IHNlcXVlbmNlIH0gPSB0d2VlblNlcXVlbmNlO1xuICAgICAgICAgICAgICAgIGlmIChzZXF1ZW5jZSAmJiBzZXF1ZW5jZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgW25leHRUd2VlblNlcXVlbmNlLCAuLi5vdGhlclR3ZWVuc10gPSBzZXF1ZW5jZTtcbiAgICAgICAgICAgICAgICAgICAgVHdlZW4uY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgbmV4dFR3ZWVuU2VxdWVuY2UpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtdXRhYmxlVHdlZW5IZWxwZXIgPSBUd2VlblNlcXVlbmNlLmdldE11dGFibGUoZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgbXV0YWJsZVR3ZWVuSGVscGVyLnNlcXVlbmNlID0gb3RoZXJUd2VlbnM7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0d2VlblNlcXVlbmNlLmxvb3AgPT09IDAgLyogVHdlZW5Mb29wLlRMX1JFU1RBUlQgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG11dGFibGVUd2VlbkhlbHBlci5zZXF1ZW5jZS5wdXNoKHR3ZWVuKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh0d2VlblNlcXVlbmNlLmxvb3AgPT09IDEgLyogVHdlZW5Mb29wLlRMX1lPWU8gKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgVHdlZW4uY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgYmFja3dhcmRzVHdlZW4odHdlZW4pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodHdlZW5TZXF1ZW5jZS5sb29wID09PSAwIC8qIFR3ZWVuTG9vcC5UTF9SRVNUQVJUICovKSB7XG4gICAgICAgICAgICAgICAgICAgIFR3ZWVuLmRlbGV0ZUZyb20oZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgY2FjaGUuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RhcnRUd2VlbnMucHVzaCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBUd2Vlbi5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB0d2Vlbik7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0sIE51bWJlci5ORUdBVElWRV9JTkZJTklUWSk7XG4gICAgZnVuY3Rpb24gYmFja3dhcmRzVHdlZW4odHdlZW4pIHtcbiAgICAgICAgaWYgKHR3ZWVuLm1vZGU/LiRjYXNlID09PSAnbW92ZScgJiYgdHdlZW4ubW9kZS5tb3ZlKSB7XG4gICAgICAgICAgICByZXR1cm4geyAuLi50d2VlbiwgbW9kZTogeyAuLi50d2Vlbi5tb2RlLCBtb3ZlOiB7IHN0YXJ0OiB0d2Vlbi5tb2RlLm1vdmUuZW5kLCBlbmQ6IHR3ZWVuLm1vZGUubW92ZS5zdGFydCB9IH0gfTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodHdlZW4ubW9kZT8uJGNh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A0NiAvKi4qLyB8fFxuICAgICAgICAgICAgICAgICAgICByZXMuY2hhckNvZGVBdChyZXMubGVuZ3RoIC0gMikgIT09IDQ2IC8qLiovKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXMubGVuZ3RoID4gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGFzdFNsYXNoSW5kZXggPSByZXMubGFzdEluZGV4T2YoJy8nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYXN0U2xhc2hJbmRleCAhPT0gcmVzLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGFzdFNsYXNoSW5kZXggPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMgPSByZXMuc2xpY2UoMCwgbGFzdFNsYXNoSW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IHJlcy5sZW5ndGggLSAxIC0gcmVzLmxhc3RJbmRleE9mKCcvJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG90cyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVzLmxlbmd0aCA9PT0gMiB8fCByZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb3RzID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChhbGxvd0Fib3ZlUm9vdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgKz0gJy8uLic7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcuLic7XG4gICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgIHJlcyArPSAnLycgKyBwYXRoLnNsaWNlKGxhc3RTbGFzaCArIDEsIGkpO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmVzID0gcGF0aC5zbGljZShsYXN0U2xhc2ggKyAxLCBpKTtcbiAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IGkgLSBsYXN0U2xhc2ggLSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGFzdFNsYXNoID0gaTtcbiAgICAgICAgICAgIGRvdHMgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGNvZGUgPT09IDQ2IC8qLiovICYmIGRvdHMgIT09IC0xKSB7XG4gICAgICAgICAgICArK2RvdHM7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBkb3RzID0gLTE7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHJlcztcbn1cbi8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG5leHBvcnQgZnVuY3Rpb24gcmVzb2x2ZSguLi5hcmdzKSB7XG4gICAgbGV0IHJlc29sdmVkUGF0aCA9ICcnO1xuICAgIGxldCByZXNvbHZlZEFic29sdXRlID0gZmFsc2U7XG4gICAgbGV0IGN3ZDtcbiAgICBmb3IgKGxldCBpID0gYXJncy5sZW5ndGggLSAxOyBpID49IC0xICYmICFyZXNvbHZlZEFic29sdXRlOyBpLS0pIHtcbiAgICAgICAgbGV0IHBhdGg7XG4gICAgICAgIGlmIChpID49IDApXG4gICAgICAgICAgICBwYXRoID0gYXJnc1tpXTtcbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBpZiAoY3dkID09PSB1bmRlZmluZWQpXG4gICAgICAgICAgICAgICAgY3dkID0gY3VycmVudFdvcmtpbmdEaXI7XG4gICAgICAgICAgICBwYXRoID0gY3dkO1xuICAgICAgICB9XG4gICAgICAgIC8vIFNraXAgZW1wdHkgZW50cmllc1xuICAgICAgICBpZiAocGF0aC5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIHJlc29sdmVkUGF0aCA9IHBhdGggKyAnLycgKyByZXNvbHZlZFBhdGg7XG4gICAgICAgIHJlc29sdmVkQWJzb2x1dGUgPSBwYXRoLmNoYXJDb2RlQXQoMCkgPT09IDQ3OyAvKi8qL1xuICAgIH1cbiAgICAvLyBBdCB0aGlzIHBvaW50IHRoZSBwYXRoIHNob3VsZCBiZSByZXNvbHZlZCB0byBhIGZ1bGwgYWJzb2x1dGUgcGF0aCwgYnV0XG4gICAgLy8gaGFuZGxlIHJlbGF0aXZlIHBhdGhzIHRvIGJlIHNh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aXRpb24gZnJvbSBjb21wb3NpdGUgaW5mb1xuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRDb21wb25lbnREZWZpbml0aW9uKGVuZ2luZSwgY29tcG9uZW50KSB7XG4gICAgY29uc3QgZXhpc3RpbmdDb21wb25lbnREZWZpbml0aW9uID0gZW5naW5lLmdldENvbXBvbmVudE9yTnVsbChjb21wb25lbnQubmFtZSk7XG4gICAgaWYgKCFleGlzdGluZ0NvbXBvbmVudERlZmluaXRpb24pIHtcbiAgICAgICAgaWYgKGNvbXBvbmVudC5uYW1lLnN0YXJ0c1dpdGgoJ2NvcmU6OicpKSB7XG4gICAgICAgICAgICBpZiAoY29tcG9uZW50Lm5hbWUgaW4gY29tcG9uZW50RGVmaW5pdGlvbkJ5TmFtZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb25lbnREZWZpbml0aW9uQnlOYW1lW2NvbXBvbmVudC5uYW1lXShlbmdpbmUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgY29yZSBjb21wb25lbnQgJHtjb21wb25lbnQubmFtZX0gd2FzIG5vdCBmb3VuZC5gKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChjb21wb25lbnQuanNvblNjaGVtYSkge1xuICAgICAgICAgICAgcmV0dXJuIGVuZ2luZS5kZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hKGNvbXBvbmVudC5uYW1lLCBTY2hlbWFzLmZyb21Kc29uKGNvbXBvbmVudC5qc29uU2NoZW1hKSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYCR7Y29tcG9uZW50Lm5hbWV9IGlzIG5vdCBkZWZpbmVkIGFuZCB0aGVyZSBpcyBubyBzY2hlbWEgdG8gZGVmaW5lIGl0L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AgICAgICAgICAgICAgICAgICBpZiAodmFsdWVUeXBlLnNlcmlhbGl6YXRpb25UeXBlID09PSAnZW50aXR5Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgY2hhbmdlZDogdHJ1ZSwgdmFsdWU6IGdldENvbXBvc2l0ZUVudGl0eSh2YWx1ZSkgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGNoYW5nZWQ6IGZhbHNlIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBjb25zdCBjb21wb3NpdGUgPSBDb21wb3NpdGVSb290Q29tcG9uZW50LmdldE11dGFibGVPck51bGwoY29tcG9zaXRlUm9vdEVudGl0eSkgfHwgQ29tcG9zaXRlUm9vdENvbXBvbmVudC5jcmVhdGUoY29tcG9zaXRlUm9vdEVudGl0eSk7XG4gICAgZm9yIChjb25zdCBbZW50aXR5U291cmNlLCB0YXJnZXRFbnRpdHldIG9mIG1hcHBlZEVudGl0aWVzKSB7XG4gICAgICAgIGNvbXBvc2l0ZS5lbnRpdGllcy5wdXNoKHtcbiAgICAgICAgICAgIHNyYzogZW50aXR5U291cmNlLFxuICAgICAgICAgICAgZGVzdDogdGFyZ2V0RW50aXR5XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBjb21wb3NpdGUuc3JjID0gY29tcG9zaXRlUmVzb3VyY2Uuc3JjO1xuICAgIHJldHVybiBjb21wb3NpdGVSb290RW50aXR5O1xufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmltcG9ydCB7IFZhbHVlIH0gZnJvbSBcIi4vZ29vZ2xlL3Byb3RvYnVmL3N0cnVjdC5nZW5cIjt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ICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VDb21wb25lbnREYXRhKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YSA9IHsgJGNhc2U6IFwianNvblwiLCBqc29uOiBWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kYXRhID0geyAkY2FzZTogXCJiaW5hcnlcIiwgYmluYXJ5OiByZWFkZXIuYnl0ZXMoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvbmVudERhdGEuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZGF0YTogaXNTZXQob2JqZWN0Lmpzb24pXG4gICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImpzb25cIiwganNvbjogb2JqZWN0Lmpzb24gfVxuICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LmJpbmFyeSlcbiAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImJpbmFyeVwiLCBiaW5hcnk6IGJ5dGVzRnJvbUJhc2U2NChvYmplY3QuYmluYXJ5KSB9XG4gICAgICAgICAgICAgICAgICAgIDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgIH1cbiAgICBDb21wb25lbnREYXRhLmZyb21KU09OID0gZnJvbUpTT047XG4gICAgZnVuY3Rpb24gdG9KU09OKG1lc3NhZ2UpIHtcbiAgICAgICAgY29uc3Qgb2JqID0ge307XG4gICAgICAgIG1lc3NhZ2UuZGF0YT8uJGNhc2UgPT09IFwianNvblwiICYmIChvYmouanNvbiA9IG1lc3NhZ2UuZGF0YT8uanNvbik7XG4gICAgICAgIG1lc3NhZ2UuZGF0YT8uJGNhc2UgPT09IFwiYmluYXJ5XCIgJiZcbiAgICAgICAgICAgIChvYmouYmluYXJ5ID0gbWVzc2FnZS5kYXRhPy5iaW5hcnkgIT09IHVuZGVmaW5lZCA/IGJhc2U2NEZyb21CeXRlcyhtZXNzYWdlLmRhdGE/LmJpbmFyeSkgOiB1bmRlZmluZWQpO1xuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbiAgICBDb21wb25lbnREYXRhLnRvSlNPTiA9IHRvSlNPTjtcbn0pKENvbXBvbmVudERhdGEgfHwgKENvbXBvbmVudERhdGEgPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZUNvbXBvc2l0ZUNvbXBvbmVudCgpIHtcbiAgICByZXR1cm4geyBuYW1lOiBcIlwiLCBqc29uU2NoZW1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W5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZUNvbXBvbmVudCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuanNvblNjaGVtYSA9IFZhbHVlLnVud3JhcChWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZW50cnkzID0gQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZW50cnkzLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YS5zZXQoZW50cnkzLmtleSwgZW50cnkzLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBuYW1lOiBpc1NldChvYmplY3QubmFtZSkgPyBTdHJpbmcob2JqZWN0Lm5hbWUpIDogXCJcIixcbiAgICAgICAgICAgIGpzb25TY2hlbWE6IGlzU2V0KG9iamVjdD8uanNvblNjaGVtYSkgPyBvYmplY3QuanNvblNjaGVtYSA6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGRhdGE6IGlzT2JqZWN0KG9iamVjdC5kYXRhKVxuICAgICAgICAgICAgICAgID8gT2JqZWN0LmVudHJpZXMob2JqZWN0LmRhdGEpLnJlZHVjZSgoYWNjLCBba2V5LCB2YWx1ZV0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgYWNjLnNldChOdW1iZXIoa2V5KSwgQ29tcG9uZW50RGF0YS5mcm9tSlNPTih2YWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICAgICAgICAgIH0sIG5ldyBNYXAoKSlcbi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wgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5rZXkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuaW50MzIobWVzc2FnZS5rZXkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIENvbXBvbmVudERhdGEuZW5jb2RlKG1lc3NhZ2UudmFsdWUsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtleSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gQ29tcG9uZW50RGF0YS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAga2V5OiBpc1NldChvYmplY3Qua2V5KSA/IE51bWJlcihvYmplY3Qua2V5KSA6IDAsXG4gICAgICAgICAgICB2YWx1ZTogaXNTZXQob2JqZWN0LnZhbHVlKSA/IENvbXBvbmVudERhdGEuZnJvbUpTT04ob2JqZWN0LnZhbHVlKSA6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5mcm9tSlNPTiA9IGZyb21KU09OO1xuICAgIGZ1bmN0aW9uIHRvSlNPTihtZXNzYWdlKSB7XG4gICAgICAgIGNvbnN0IG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G4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgQ29tcG9zaXRlRGVmaW5pdGlvbi5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZURlZmluaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZlcnNpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb21wb25lbnRzLnB1c2goQ29tcG9zaXRlQ29tcG9uZW50LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmVyc2lvbjogaXNTZXQob2JqZWN0LnZlcnNpb24pID8gTnVtYmVyKG9iamVjdC52ZXJzaW9uKSA6IDAsXG4gICAgICAgICAgICBjb21wb25lbnRzOiBBcnJheS5pc0FycmF5KG9iamVjdD8uY29tcG9uZW50cylcbiAgICAgICAgICAgICAgICA/IG9iamVjdC5jb21wb25lbnRzLm1hcCgoZSkgPT4gQ29tcG9zaXRlQ29tcG9uZW50LmZyb21KU09OKGUpKVxuICAgICAgICAgICAgICAgIDogW10sXG4gICAgICAgIH07XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgbWVzc2FnZS52ZXJzaW9uICE9PSB1bmRlZmluZWQgJiYgKG9iai52ZXJzaW9uID0gTWF0aC5yb3VuZChtZXNzYWdlLnZlcnNpb24pKTtcbiAgICAgICAgaWYgKG1lc3NhZ2UuY29tcG9uZW50cykge1xuICAgICAgICAgICAgb2JqLmNvbXBvbmVudHMgPSBtZXNzYWdlLmNvbXBvbmVudHMubWFwKChlKSA9PiBlID8gQ29tcG9zaXR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Ck7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVN0cnVjdCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBlbnRyeTEgPSBTdHJ1Y3RfRmllbGRzRW50cnkuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVudHJ5MS52YWx1ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpZWxkcy5zZXQoZW50cnkxLmtleSwgZW50cnkxLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFN0cnVjdC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBmaWVsZHM6IGlzT2JqZWN0KG9iamVjdC5maWVsZHMpXG4gICAgICAgICAgICAgICAgPyBPYmplY3QuZW50cmllcyhvYmplY3QuZmllbGRzKS5yZWR1Y2UoKGFjYywgW2tleSwgdmFsdWVdKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGFjYy5zZXQoa2V5LCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgICAgICAgICAgfSwgbmV3IE1hcCgpKVxuICAgICAgICAgICAgICAgIDogbmV3IE1hcCgpLFxuICAgICAgICB9O1xuICAgIH1cbiAgICBTdHJ1Y3QuZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgb2JqLmZpZWxkcyA9IHt9O1xuICAgICAgICBpZiAobWVzc2FnZS5maWVsZHMpIHtcbiAgICAgICAgICAgIG1lc3NhZ2UuZmllbGRzLmZvckVhY2goKHYsIGspID0+IHtcbiAgICAgICAgICAgICAgICBvYmouZmllbGRzW2tdID0gdjtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIFN0cnVjdC50b0pTT04gPSB0b0pTT047XG4gICAgZnVuY3Rpb24gd3JhcChvYmplY3QpIHtcbiAgICAgICAgY29uc3Qgc3RydWN0ID0gY3JlYXRlQmFzZVN0cnVjdCgpO1xuICAgICAgICBpZiAob2JqZWN0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKG9iamVjdCkuZm9yRWFjaCgoa2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgc3RydWN0LmZpZWxkcy5zZXQoa2V5LCBvYmplY3Rba2V5XSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAg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cbiAgICB9XG4gICAgU3RydWN0X0ZpZWxkc0VudHJ5LmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlU3RydWN0X0ZpZWxkc0VudHJ5KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2V5ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gVmFsdWUudW53cmFwKFZhbHVlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAg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uZXhwb3J0IHZhciBWYWx1ZTtcbihmdW5jdGlvbiAoVmFsdWUpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2Uua2luZD8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJudWxsVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDgpLmludDMyKG1lc3NhZ2Uua2luZC5udWxsVmFsdWUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcIm51bWJlclZhbHVlXCI6XG4gICAgICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNykuZG91YmxlKG1lc3NhZ2Uua2luZC5udW1iZXJWYWx1ZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwic3RyaW5nVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDI2KS5zdHJpbmcobWVzc2FnZS5raW5kLnN0cmluZ1ZhbHVlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJib29sVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDMyKS5ib29sKG1lc3NhZ2Uua2luZC5ib29sVmFsdWUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInN0cnVjdFZhbHVlXCI6XG4gICAgICAgICAgICAgICAgU3RydWN0LmVuY29kZShTdHJ1Y3Qud3JhcChtZXNzYWdlLmtpbmQuc3RydWN0VmFsdWUpLCB3cml0ZXIudWludDMyKDQyKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImxpc3RWYWx1ZVwiOlxuICAgICAgICAgICAgICAgIExpc3RWYWx1ZS5lbmNvZGUoTGlzdFZhbHVlLndyYXAobWVzc2FnZS5raW5kLmxpc3RWYWx1ZSksIHdyaXRlci51aW50MzIoNTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVmFsdWUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWYWx1ZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwibnVsbFZhbHVlXCIsIG51bGxWYWx1ZTogcmVhZGVyLmludDMyKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJudW1iZXJWYWx1ZVwiLCBudW1iZXJWYWx1ZTogcmVhZGVyLmRvdWJsZSgpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwic3RyaW5nVmFsdWVcIiwgc3RyaW5nVmFsdWU6IHJlYWRlci5zdHJpbmcoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtpbmQgPSB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IHJlYWRlci5ib29sKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJzdHJ1Y3RWYWx1ZVwiLCBzdHJ1Y3RWYWx1ZTogU3RydWN0LnVud3JhcChTdHJ1Y3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJsaXN0VmFsdWVcIiwgbGlzdFZhbHVlOiBMaXN0VmFsdWUudW53cmFwKExpc3RWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZhbHVlLmRlY29kZSA9IGRlY29kZTtcbiAgICBmdW5jdGlvbiBmcm9tSlNPTihvYmplY3QpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGtpbmQ6IGlzU2V0KG9iamVjdC5udWxsVmFsdWUpXG4gICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bGxWYWx1ZVwiLCBudWxsVmFsdWU6IG51bGxWYWx1ZUZyb21KU09OKG9iamVjdC5udWxsVmFsdWUpIH1cbiAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5udW1iZXJWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bWJlclZhbHVlXCIsIG51bWJlclZhbHVlOiBOdW1iZXIob2JqZWN0Lm51bWJlclZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LnN0cmluZ1ZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcInN0cmluZ1ZhbHVlXCIsIHN0cmluZ1ZhbHVlOiBTdHJpbmcob2JqZWN0LnN0cmluZ1ZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5ib29sVmFsdWUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IEJvb2xlYW4ob2JqZWN0LmJvb2xWYWx1ZSkgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LnN0cnVjdFZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHsgJGNhc2U6IFwic3RydWN0VmFsdWVcIiwgc3RydWN0VmFsdWU6IG9iamVjdC5zdHJ1Y3RWYWx1ZSB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0Lmxpc3RWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8geyAkY2FzZTogXCJsaXN0VmFsdWVcIiwgbGlzdFZhbHVlOiBbLi4ub2JqZWN0Lmxpc3RWYWx1ZV0gfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgfVxuICAgIFZhbHVlLmZyb21KU09OID0gZnJvbUpTT047XG4gICAgZnVuY3Rpb24gdG9KU09OKG1lc3NhZ2UpIHtcbiAgICAgICAgY29uc3Qgb2JqID0ge307XG4gICAgICAgIG1lc3NhZ2Uua2luZD8uJGNhc2UgPT09IFwibnVsbFZhbHVlXCIgJiZcbiAgICAgICAgICAgIChvYmoubnVsbFZhbHVlID0gbWVzc2FnZS5raW5kPy5udWxsVmFsdWUgIT09IHVuZGVmaW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MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52YWx1ZXMucHVzaChWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIExpc3RWYWx1ZS5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7IHZhbHVlczogQXJyYXkuaXNBcnJheShvYmplY3Q/LnZhbHVlcykgPyBbLi4ub2JqZWN0LnZhbHVlc10gOiBbXSB9O1xuICAgIH1cbiAgICBMaXN0VmFsdWUuZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgaWYgKG1lc3NhZ2UudmFsdWVzKSB7XG4gICAgICAgICAgICBvYmoudmFsdWVzID0gbWVzc2FnZS52YWx1ZXMubWFwKChlKSA9PiBlKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIG9iai52YWx1ZXMgPSBbXTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbiAgICBMaXN0VmFsdWUudG9KU09OID0gdG9KU09OO1xuICAgIGZ1bmN0aW9uIHdyYXAoYXJyYXkp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LCBhbW91bnQpIHtcbiAgICAgICAgY29uc3Qgc3F1YXJlZCA9IGFtb3VudCAqIGFtb3VudDtcbiAgICAgICAgY29uc3QgY3ViZWQgPSBhbW91bnQgKiBzcXVhcmVkO1xuICAgICAgICBjb25zdCB4ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueCArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueCArIHZhbHVlMy54KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS54IC0gNS4wICogdmFsdWUyLnggKyA0LjAgKiB2YWx1ZTMueCAtIHZhbHVlNC54KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnggKyAzLjAgKiB2YWx1ZTIueCAtIDMuMCAqIHZhbHVlMy54ICsgdmFsdWU0LngpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB5ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueSArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueSArIHZhbHVlMy55KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS55IC0gNS4wICogdmFsdWUyLnkgKyA0LjAgKiB2YWx1ZTMueSAtIHZhbHVlNC55KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnkgKyAzLjAgKiB2YWx1ZTIueSAtIDMuMCAqIHZhbHVlMy55ICsgdmFsdWU0LnkpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB6ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueiArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueiArIHZhbHVlMy56KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS56IC0gNS4wICogdmFsdWUyLnogKyA0LjAgK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gICAgKiBAcmV0dXJucyB0aGUgdXBkYXRlZCBQbGFuZS5cbiAgICAgKi9cbiAgICBmdW5jdGlvbiBjb3B5RnJvbVBvaW50cyhwb2ludDEsIHBvaW50MiwgcG9pbnQzKSB7XG4gICAgICAgIGNvbnN0IHgxID0gcG9pbnQyLnggLSBwb2ludDEueDtcbiAgICAgICAgY29uc3QgeTEgPSBwb2ludDIueSAtIHBvaW50MS55O1xuICAgICAgICBjb25zdCB6MSA9IHBvaW50Mi56IC0gcG9pbnQxLno7XG4gICAgICAgIGNvbnN0IHgyID0gcG9pbnQzLnggLSBwb2ludDEueDtcbiAgICAgICAgY29uc3QgeTIgPSBwb2ludDMueSAtIHBvaW50MS55O1xuICAgICAgICBjb25zdCB6MiA9IHBvaW50My56IC0gcG9pbnQxLno7XG4gICAgICAgIGNvbnN0IHl6ID0geTEgKiB6MiAtIHoxICogeTI7XG4gICAgICAgIGNvbnN0IHh6ID0gejEgKiB4MiAtIHgxICogejI7XG4gICAgICAgIGNvbnN0IHh5ID0geDEgKiB5MiAtIHkxICogeDI7XG4gICAgICAgIGNvbnN0IHB5dGggPSBNYXRoLnNxcnQoeXogKiB5eiArIHh6ICogeHogKyB4eSAqIHh5KTtcbiAgICAgICAgbGV0IGludlB5dGg7XG4gICAgICAgIGlmIChweXRoICE9PSAwKSB7XG4gICAgICAgICAgICBpbnZQeXRoID0gMS4wIC8gcHl0aDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGludlB5dGggPSAwLjA7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3Qgbm9ybWFsID0gVmVjdG9yMy5jcmVhdGUoeXogKiBpbnZQeXRoLCB4eiAqIGludlB5dGgsIHh5ICogaW52UHl0aCk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBub3JtYWwsXG4gICAgICAgICAgICBkOiAtKG5vcm1hbC54ICogcG9pbnQxLnggKyBub3JtYWwueSAqIHBvaW50MS55ICsgbm9ybWFs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VXBkYXRlZChzZWxmKSB7XG4gICAgICAgIHNlbGYudXBkYXRlRmxhZyA9IF91cGRhdGVGbGFnU2VlZCsrO1xuICAgICAgICBzZWxmLmlzSWRlbnRpdHkgPSBmYWxzZTtcbiAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gZmFsc2U7XG4gICAgICAgIHNlbGYuX2lzSWRlbnRpdHlEaXJ0eSA9IHRydWU7XG4gICAgICAgIHNlbGYuX2lzSWRlbnRpdHkzeDJEaXJ0eSA9IHRydWU7XG4gICAgfVxuICAgIC8vIFByb3BlcnRpZXNcbiAgICAvKipcbiAgICAgKiBDaGVjayBpZiB0aGUgY3VycmVudCBtYXRyaXggaXMgaWRlbnRpdHlcbiAgICAgKiBAcmV0dXJucyB0cnVlIGlzIHRoZSBtYXRyaXggaXMgdGhlIGlkZW50aXR5IG1hdHJpeFxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGlzSWRlbnRpdHlVcGRhdGUoc2VsZikge1xuICAgICAgICBpZiAoc2VsZi5faXNJZGVudGl0eURpcnR5KSB7XG4gICAgICAgICAgICBzZWxmLl9pc0lkZW50aXR5RGlydHkgPSBmYWxzZTtcbiAgICAgICAgICAgIGNvbnN0IG0gPSBzZWxmLl9tO1xuICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5ID1cbiAgICAgICAgICAgICAgICBtWzBdID09PSAxLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMl0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzNdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bNV0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzZdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs3XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bOF0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzldID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxMF0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzExXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTJdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxM10gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzE0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTVdID09PSAxLjA7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHNlbGYuaXNJZGVudGl0eTtcbiAgICB9XG4gICAgTWF0cml4LmlzSWRlbnRpdHlVcGRhdGUgPSBpc0lkZW50aXR5VXBkYXRlO1xuICAgIC8qKlxuICAgICAqIENoZWNrIGlmIHRoZSBjdXJyZW50IG1hdHJpeCBpcyBpZGVudGl0eSBhcyBhIHRleHR1cmUgbWF0cml4ICgzeDIgc3RvcmUgaW4gNHg0KVxuICAgICAqIEByZXR1cm5zIHRydWUgaXMgdGhlIG1hdHJpeCBpcyB0aGUgaWRlbnRpdHkgbWF0cml4XG4gICAgICovXG4gICAgZnVuY3Rpb24gaXNJZGVudGl0eUFzM3gyVXBkYXRlKHNlbGYpIHtcbiAgICAgICAgaWYgKHNlbGYuX2lzSWRlbnRpdHkzeDJEaXJ0eSkge1xuICAgICAgICAgICAgc2VsZi5faXNJZGVudGl0eTN4MkRpcnR5ID0gZmFsc2U7XG4gICAgICAgICAgICBpZiAoc2VsZi5fbVswXSAhPT0gMS4wIHx8IHNlbGYuX21bNV0gIT09IDEuMCB8fCBzZWxmLl9tWzE1XSAhPT0gMS4wKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChzZWxmLl9tWzFdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzJdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzNdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzRdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzZdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzddICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzhdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzldICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzEwXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxMV0gIT09IDAuMCB8fFxuICAgICAgICAgICAgICAgIHNlbGYuX21bMTJdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzEzXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxNF0gIT09IDAuMCkge1xuICAgICAgICAgICAgICAgIHNlbGYuaXNJZGVudGl0eTN4MiA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5M3gyO1xuICAgIH1cbiAgICBNYXRyaXguaXNJZGVudGl0eUFzM3gyVXBkYXRlID0gaXNJZGVudGl0eUFzM3gyVXBkYXRlO1xuICAgIC8qKlxuICAgICAqIEdldHMgdGhlIGRldGVybWluYW50IG9mIHRoZSBtYXRyaXhcbiAgICAgKiBAcmV0dXJucyB0aGUgbWF0cml4IGRldGVybWluYW50XG4gICAgICovXG4gICAgZnVuY3Rpb24gZGV0ZXJtaW5hbnQoc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4gICAgICAgIGNvbnN0IGNvZmFjdF8wMyA9IC0obTEwICogZGV0XzIxXzMyIC0gbTExICogZGV0XzIwXzMyICsgbTEyICogZGV0XzIwXzMxKTtcbiAgICAgICAgY29uc3QgZGV0ID0gbTAwICogY29mYWN0XzAwICsgbTAxICogY29mYWN0XzAxICsgbTAyICogY29mYWN0XzAyICsgbTAzICogY29mYWN0XzAzO1xuICAgICAgICBpZiAoZGV0ID09PSAwKSB7XG4gICAgICAgICAgICBjb3B5KHNvdXJjZSwgcmVzdWx0KTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBkZXRJbnYgPSAxIC8gZGV0O1xuICAgICAgICBjb25zdCBkZXRfMTJfMzMgPSBtMTIgKiBtMzMgLSBtMzIgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMV8zMyA9IG0xMSAqIG0zMyAtIG0zMSAqIG0xMztcbiAgICAgICAgY29uc3QgZGV0XzExXzMyID0gbTExICogbTMyIC0gbTMxICogbTEyO1xuICAgICAgICBjb25zdCBkZXRfMTBfMzMgPSBtMTAgKiBtMzMgLSBtMzAgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMF8zMiA9IG0xMCAqIG0zMiAtIG0zMCAqIG0xMjtcbiAgICAgICAgY29uc3QgZGV0XzEwXzMxID0gbTEwICogbTMxIC0gbTMwICogbTExO1xuICAgICAgICBjb25zdCBkZXRfMTJfMjMgPSBtMTIgKiBtMjMgLSBtMjIgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMV8yMyA9IG0xMSAqIG0yMyAtIG0yMSAqIG0xMztcbiAgICAgICAgY29uc3QgZGV0XzExXzIyID0gbTExICogbTIyIC0gbTIxICogbTEyO1xuICAgICAgICBjb25zdCBkZXRfMTBfMjMgPSBtMTAgKiBtMjMgLSBtMjAgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMF8yMiA9IG0xMCAqIG0yMiAtIG0yMCAqIG0xM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zRdLCBvbTUgPSBvdGhlck1bNV0sIG9tNiA9IG90aGVyTVs2XSwgb203ID0gb3RoZXJNWzddO1xuICAgICAgICBjb25zdCBvbTggPSBvdGhlck1bOF0sIG9tOSA9IG90aGVyTVs5XSwgb20xMCA9IG90aGVyTVsxMF0sIG9tMTEgPSBvdGhlck1bMTFdO1xuICAgICAgICBjb25zdCBvbTEyID0gb3RoZXJNWzEyXSwgb20xMyA9IG90aGVyTVsxM10sIG9tMTQgPSBvdGhlck1bMTRdLCBvbTE1ID0gb3RoZXJNWzE1XTtcbiAgICAgICAgLy8gdHNsaW50OmVuYWJsZTpvbmUtdmFyaWFibGUtcGVyLWRlY2xhcmF0aW9uXG4gICAgICAgIHJlc3VsdFtvZmZzZXRdID0gdG0wICogb20wICsgdG0xICogb200ICsgdG0yICogb204ICsgdG0zICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDFdID0gdG0wICogb20xICsgdG0xICogb201ICsgdG0yICogb205ICsgdG0zICogb20xMztcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDJdID0gdG0wICogb20yICsgdG0xICogb202ICsgdG0yICogb20xMCArIHRtMyAqIG9tMTQ7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyAzXSA9IHRtMCAqIG9tMyArIHRtMSAqIG9tNyArIHRtMiAqIG9tMTEgKyB0bTMgKiBvbTE1O1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNF0gPSB0bTQgKiBvbTAgKyB0bTUgKiBvbTQgKyB0bTYgKiBvbTggKyB0bTcgKiBvbTEyO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNV0gPSB0bTQgKiBvbTEgKyB0bTUgKiBvbTUgKyB0bTYgKiBvbTkgKyB0bTcgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNl0gPSB0bTQgKiBvbTIgKyB0bTUgKiBvbTYgKyB0bTYgKiBvbTEwICsgdG03ICogb20xNDtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDddID0gdG00ICogb20zICsgdG01ICogb203ICsgdG02ICogb20xMSArIHRtNyAqIG9tMTU7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyA4XSA9IHRtOCAqIG9tMCArIHRtOSAqIG9tNCArIHRtMTAgKiBvbTggKyB0bTExICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDldID0gdG04ICogb20xICsgdG05ICogb201ICsgdG0xMCAqIG9tOSArIHRtMTEgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTBdID0gdG04ICogb20yICsgdG05ICogb202ICsgdG0xMCAqIG9tMTAgKyB0bTExICogb20xNDtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDExXSA9IHRtOCAqIG9tMyArIHRtOSAqIG9tNyArIHRtMTAgKiBvbTExICsgdG0xMSAqIG9tMTU7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyAxMl0gPSB0bTEyICogb20wICsgdG0xMyAqIG9tNCArIHRtMTQgKiBvbTggKyB0bTE1ICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDEzXSA9IHRtMTIgKiBvbTEgKyB0bTEzICogb201ICsgdG0xNCAqIG9tOSArIHRtMTUgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTRdID0gdG0xMiAqIG9tMiArIHRtMTMgKiBvbTYgKyB0bTE0ICogb20xMCArIHRtMTUgKiBvbTE0O1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTVdID0gdG0xMiAqIG9tMyArIHRtMTMgKiBvbTcgKyB0bTE0ICogb20xMSArIHRtMTUgKiBvbTE1O1xuICAgIH1cbiAgICBNYXRyaXgubXVsdGlwbHlUb0FycmF5ID0gbXVsdGlwbHlUb0FycmF5O1xuICAgIC8qKlxuICAgICAqIENoZWNrIGVxdWFsaXR5IGJldHdlZW4gc2VsZiBtYXRyaXggYW5kIGEgc2Vjb25kIG9uZVxuICAgICAqIEBwYXJhbSB2YWx1ZSAtIGRlZmluZXMgdGhlIHNlY29uZCBtYXRyaXggdG8gY29tcGFyZVxuICAgICAqIEByZXR1cm5zIHRydWUgaXMgdGhlIGN1cnJlbnQgbWF0cml4IGFuZCB0aGUgZ2l2ZW4gb25lIHZhbHVlcyBhcmUgc3RyaWN0bHkgZXF1YWxcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBlcXVhbHMoc2VsZiwgdmFsdWUpIHtcbiAgICAgICAgY29uc3Qgb3RoZXIgPSB2YWx1ZTtcbiAgICAgICAgaWYgKCFvdGhlcikge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzZWxmLmlzSWRlbnRpdHkgfHwgb3RoZXIuaXNJZGVudGl0eSkge1xuICAgICAgICAgICAgaWYgKCFzZWxmLl9pc0lkZW50aXR5RGlydHkgJiYgIW90aGVyLl9pc0lkZW50aXR5RGlydHkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5ICYmIG90aGVyLmlzSWRlbnRpdHk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbSA9IHNlbGYuX207XG4gICAgICAgIGNvbnN0IG9tID0gb3RoZXIuX207XG4gICAgICAgIHJldHVybiAobVswXSA9PT0gb21bMF0gJiZcbiAgICAgICAgICAgIG1bMV0gPT09IG9tWzFdICYmXG4gICAgICAgICAgICBtWzJdID09PSBvbVsyXSAmJlxuICAgICAgICAgICAgbVszXSA9PT0gb21bM10gJiZcbiAgICAgICAgICAgIG1bNF0gPT09IG9tWzRdICYmXG4gICAgICAgICAgICBtWzVdID09PSBvbVs1XSAmJlxuICAgICAgICAgICAgbVs2XSA9PT0gb21bNl0gJiZcbiAgICAgICAgICAgIG1bN10gPT09IG9tWzddICYmXG4gICAgICAgICAgICBtWzhdID09PSBvbVs4XSAmJlxuICAgICAgICAgICAgbVs5XSA9PT0gb21bOV0gJiZcb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b24udyA9IDE7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueCA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueSA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueiA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBtID0gc2VsZi5fbTtcbiAgICAgICAgaWYgKHRyYW5zbGF0aW9uKSB7XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi54ID0gbVsxMl07XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi55ID0gbVsxM107XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi56ID0gbVsxNF07XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXNlZFNjYWxlID0gc2NhbGUgfHwgVmVjdG9yMy5aZXJvKCk7XG4gICAgICAgIHVzZWRTY2FsZS54ID0gTWF0aC5zcXJ0KG1bMF0gKiBtWzBdICsgbVsxXSAqIG1bMV0gKyBtWzJdICogbVsyXSk7XG4gICAgICAgIHVzZWRTY2FsZS55ID0gTWF0aC5zcXJ0KG1bNF0gKiBtWzRdICsgbVs1XSAqIG1bNV0gKyBtWzZdICogbVs2XSk7XG4gICAgICAgIHVzZWRTY2FsZS56ID0gTWF0aC5zcXJ0KG1bOF0gKiBtWzhdICsgbVs5XSAqIG1bOV0gKyBtWzEwXSAqIG1bMTBdKTtcbiAgICAgICAgaWYgKGRldGVybWluYW50KHNlbGYpIDw9IDApIHtcbiAgICAgICAgICAgIHVzZWRTY2FsZS55ICo9IC0xO1xuICAgICAgICB9XG4gICAgICAgIGlmICh1c2VkU2NhbGUueCA9PT0gMCB8fCB1c2VkU2NhbGUueSA9PT0gMCB8fCB1c2VkU2NhbGUueiA9PT0gMCkge1xuICAgICAgICAgICAgaWYgKHJvdGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgcm90YXRpb24udyA9IDE7XG4gICAgICAgICAgICAgICAgcm90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wID0geyB4OiAwLjAsIHk6IDEuMCwgejogMC4wIH0pIHtcbiAgICAgICAgY29uc3QgZm9yd2FyZE5ldyA9IFZlY3RvcjMubm9ybWFsaXplKGZvcndhcmQpO1xuICAgICAgICBjb25zdCByaWdodCA9IFZlY3RvcjMubm9ybWFsaXplKFZlY3RvcjMuY3Jvc3ModXAsIGZvcndhcmROZXcpKTtcbiAgICAgICAgY29uc3QgdXBOZXcgPSBWZWN0b3IzLmNyb3NzKGZvcndhcmROZXcsIHJpZ2h0KTtcbiAgICAgICAgY29uc3QgbTAwID0gcmlnaHQueDtcbiAgICAgICAgY29uc3QgbTAxID0gcmlnaHQueTtcbiAgICAgICAgY29uc3QgbTAyID0gcmlnaHQuejtcbiAgICAgICAgY29uc3QgbTEwID0gdXBOZXcueDtcbiAgICAgICAgY29uc3QgbTExID0gdXBOZXcueTtcbiAgICAgICAgY29uc3QgbTEyID0gdXBOZXcuejtcbiAgICAgICAgY29uc3QgbTIwID0gZm9yd2FyZE5ldy54O1xuICAgICAgICBjb25zdCBtMjEgPSBmb3J3YXJkTmV3Lnk7XG4gICAgICAgIGNvbnN0IG0yMiA9IGZvcndhcmROZXcuejtcbiAgICAgICAgY29uc3QgbnVtOCA9IG0wMCArIG0xMSArIG0yMjtcbiAgICAgICAgY29uc3QgcXVhdGVybmlvbiA9IGNyZWF0ZSgpO1xuICAgICAgICBpZiAobnVtOCA+IDApIHtcbiAgICAgICAgICAgIGxldCBudW0gPSBNYXRoLnNxcnQobnVtOCArIDEpO1xuICAgICAgICAgICAgcXVhdGVybmlvbi53ID0gbnVtICogMC41O1xuICAgICAgICAgICAgbnVtID0gMC41IC8gbnVtO1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gKG0xMiAtIG0yMSkgKiBudW07XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnkgPSAobTIwIC0gbTAyKSAqIG51bTtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDEgLSBtMTApICogbnVtO1xuICAgICAgICAgICAgcmV0dXJuIHF1YXRlcm5pb247XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG0wMCA+PSBtMTEgJiYgbTAwID49IG0yMikge1xuICAgICAgICAgICAgY29uc3QgbnVtNyA9IE1hdGguc3FydCgxICsgbTAwIC0gbTExIC0gbTIyKTtcbiAgICAgICAgICAgIGNvbnN0IG51bTQgPSAwLjUgLyBudW03O1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gMC41ICogbnVtNztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IChtMDEgKyBtMTApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDIgKyBtMjApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24udyA9IChtMTIgLSBtMjEpICogbnVtNDtcbiAgICAgICAgICAgIHJldHVybiBxdWF0ZXJuaW9uO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtMTEgPiBtMjIpIHtcbiAgICAgICAgICAgIGNvbnN0IG51bTYgPSBNYXRoLnNxcnQoMSArIG0xMSAtIG0wMCAtIG0yMik7XG4gICAgICAgICAgICBjb25zdCBudW0zID0gMC41IC8gbnVtNjtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueCA9IChtMTAgKyBtMDEpICogbnVtMztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IDAuNSAqIG51bTY7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnogPSAobTIxICsgbTEyKSAqIG51bTM7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLncgPSAobTIwIC0gbTAyKSAqIG51bTM7XG4gICAgICAgICAgICByZXR1cm4gcXVhdGVybmlvbjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBudW01ID0gTWF0aC5zcXJ0KDEgKyBtMjIgLSBtMDAgLSBtMTEpO1xuICAgICAgICBjb25zdCBudW0yID0gMC41IC8gbnVtNTtcbiAgICAgICAgcXVhdGVybmlvbi54ID0gKG0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lvbidzIG5vdC1ub3JtYWxpemVkbmVzc1xuICAgICAgICBjb25zdCB1bml0ID0gcS54ICogcS54ICsgcS55ICogcS55ICsgcS56ICogcS56ICsgcS53ICogcS53O1xuICAgICAgICAvLyBxIHdpbGwgaGF2ZSBhIG1hZ25pdHVkZSBvZiAwLjUgb3IgZ3JlYXRlciBpZiBhbmQgb25seSBpZiBxIGlzIGEgc2luZ3VsYXJpdHkgY2FzZVxuICAgICAgICBjb25zdCB0ZXN0ID0gcS54ICogcS53IC0gcS55ICogcS56O1xuICAgICAgICBpZiAodGVzdCA+IDAuNDk5NSAqIHVuaXQpIHtcbiAgICAgICAgICAgIC8vIHNpbmd1bGFyaXR5IGF0IG5vcnRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gTWF0aC5QSSAvIDI7XG4gICAgICAgICAgICBvdXQueSA9IDIgKiBNYXRoLmF0YW4yKHEueSwgcS54KTtcbiAgICAgICAgICAgIG91dC56ID0gMDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0ZXN0IDwgLTAuNDk5NSAqIHVuaXQpIHtcbiAgICAgICAgICAgIC8vIHNpbmd1bGFyaXR5IGF0IHNvdXRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gLU1hdGguUEkgLyAyO1xuICAgICAgICAgICAgb3V0LnkgPSAtMiAqIE1hdGguYXRhbjIocS55LCBxLngpO1xuICAgICAgICAgICAgb3V0LnogPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gbm8gc2luZ3VsYXJpdHkgLSBxIGlzIHRoZSBtYWpvcml0eSBvZiBjYXNlc1xuICAgICAgICAgICAgb3V0LnggPSBNYXRoLmFzaW4oMiAqIChxLncgKiBxLnggLSBxLnkgKiBxLnopKTtcbiAgICAgICAgICAgIG91dC55ID0gTWF0aC5hdGFuMigyICogcS53ICogcS55ICsgMiAqIHEueiAqIHEueCwgMSAtIDIgKiAocS54ICogcS54ICsgcS55ICogcS55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ICB9XG4gICAgICAgIGVsc2UgaWYgKG0xMSA+IG0yMiAmJiBtMTEgPiBtMzMpIHtcbiAgICAgICAgICAgIHMgPSAyLjAgKiBNYXRoLnNxcnQoMS4wICsgbTExIC0gbTIyIC0gbTMzKTtcbiAgICAgICAgICAgIHJlc3VsdC53ID0gKG0zMiAtIG0yMykgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnggPSAwLjI1ICogcztcbiAgICAgICAgICAgIHJlc3VsdC55ID0gKG0xMiArIG0yMSkgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnogPSAobTEzICsgbTMxKSAvIHM7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAobTIyID4gbTMzKSB7XG4gICAgICAgICAgICBzID0gMi4wICogTWF0aC5zcXJ0KDEuMCArIG0yMiAtIG0xMSAtIG0zMyk7XG4gICAgICAgICAgICByZXN1bHQudyA9IChtMTMgLSBtMzEpIC8gcztcbiAgICAgICAgICAgIHJlc3VsdC54ID0gKG0xMiArIG0yMSkgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnkgPSAwLjI1ICogcztcbiAgICAgICAgICAgIHJlc3VsdC56ID0gKG0yMyArIG0zMikgLyBzO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcyA9IDIuMCAqIE1hdGguc3FydCgxLjAgKyBtMzMgLSBtMTEgLSBtMjIpO1xuICAgICAgICAgICAgcmVzdWx0LncgPSAobTIxIC0gbTEyKSAvIHM7XG4gICAgICAgICAgICByZXN1bHQueCA9IChtMTMgKyBtMzEpIC8gcztcbiAgICAgICAgICAgIHJlc3VsdC55ID0gKG0yMyArIG0zMikgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnogPSAwLjI1ICogcztcbiAgICAgICAgfVxuICAgIH1cbiAgICBRdWF0ZXJuaW9uLmZyb21Sb3RhdGlvbk1hdHJpeFRvUmVmID0gZnJvbVJvdGF0aW9uTWF0cml4VG9SZWY7XG4gICAgLyoqXG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pIHtcbiAgICAgICAgbGV0IG51bTI7XG4gICAgICAgIGxldCBudW0zO1xuICAgICAgICBsZXQgbnVtNCA9IGxlZnQueCAqIHJpZ2h0LnggKyBsZWZ0LnkgKiByaWdodC55ICsgbGVmdC56ICogcmlnaHQueiArIGxlZnQudyAqIHJpZ2h0Lnc7XG4gICAgICAgIGxldCBmbGFnID0gZmFsc2U7XG4gICAgICAgIGlmIChudW00IDwgMCkge1xuICAgICAgICAgICAgZmxhZyA9IHRydWU7XG4gICAgICAgICAgICBudW00ID0gLW51bTQ7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG51bTQgPiAwLjk5OTk5OSkge1xuICAgICAgICAgICAgbnVtMyA9IDEgLSBhbW91bnQ7XG4gICAgICAgICAgICBudW0yID0gZmxhZyA/IC1hbW91bnQgOiBhbW91bnQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjb25zdCBudW01ID0gTWF0aC5hY29zKG51bTQpO1xuICAgICAgICAgICAgY29uc3QgbnVtNiA9IDEuMCAvIE1hdGguc2luKG51bTUpO1xuICAgICAgICAgICAgbnVtMyA9IE1hdGguc2luKCgxLjAgLSBhbW91bnQpICogbnVtNSkgKiBudW02O1xuICAgICAgICAgICAgbnVtMiA9IGZsYWdcbiAgICAgICAgICAgICAgICA/IC1NYXRoLnNpbihhbW91bnQgKiBudW01KSAqIG51bTZcbiAgICAgICAgICAgICAgICA6IE1hdGguc2luKGFtb3VudCAqIG51bTUpICogbnVtNjtcbiAgICAgICAgfVxuICAgICAgICByZXN1bHQueCA9IG51bTMgKiBsZWZ0LnggKyBudW0yICogcmlnaHQueDtcbiAgICAgICAgcmVzdWx0LnkgPSBudW0zICogbGVmdC55ICsgbnVtMiAqIHJpZ2h0Lnk7XG4gICAgICAgIHJlc3VsdC56ID0gbnVtMyAqIGxlZnQueiArIG51bTIgKiByaWdodC56O1xuICAgICAgICByZXN1bHQudyA9IG51bTMgKiBsZWZ0LncgKyBudW0yICog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b25zdCBjb2xvcnM0ID0gW107XG4gICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgY29sb3JzLmxlbmd0aDsgaW5kZXggKz0gMykge1xuICAgICAgICAgICAgICAgIGNvbnN0IG5ld0luZGV4ID0gKGluZGV4IC8gMykgKiA0O1xuICAgICAgICAgICAgICAgIGNvbG9yczRbbmV3SW5kZXhdID0gY29sb3JzW2luZGV4XTtcbiAgICAgICAgICAgICAgICBjb2xvcnM0W25ld0luZGV4ICsgMV0gPSBjb2xvcnNbaW5kZXggKyAxXTtcbiAgICAgICAgICAgICAgICBjb2xvcnM0W25ld0luZGV4ICsgMl0gPSBjb2xvcnNbaW5kZXggKyAyXTtcbiAgICAgICAgICAgICAgICBjb2xvcnM0W25ld0luZGV4ICsgM10gPSAxLjA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY29sb3JzNDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gY29sb3JzO1xuICAgIH1cbiAgICBDb2xvcjQuY2hlY2tDb2xvcnM0ID0gY2hlY2tDb2xvcnM0O1xuICAgIC8vIE9wZXJhdG9yc1xuICAgIC8qKlxuICAgICAqIEFkZHMgIHRoZSBnaXZlbiBDb2xvcjQgdmFsdWVzIHRvIHRoZSByZWYgQ29sb3I0IG9iamVjdFxuICAgICAqIEBwYXJhbSBhIC0gZGVmaW5lcyB0aGUgZmlyc3Qgb3BlcmFuZFxuICAgICAqIEBwYXJhbSBiIC0gZGVmaW5lcyB0aGUgc2Vjb25kIG9wZXJhbmRcbiAgICAgKiBAcGFyYW0gcmVmIC0gZGVmaW5lcyB0aGUgcmVzdWx0IHJmZXJlbmNlXG4gICAgICogQHJldHVybnNcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBhZGRUb1JlZihhLCBiLCByZWYpIHtcbiAgICAgICAgcmVmLnIgPSBhLnIgKyBiLnI7XG4gICAgICAgIHJlZi5nID0gYS5nICsgYi5nO1xuICAgICAgICByZWY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HJlcHJlc2VudGF0aW9uIG9mIHRoZSBDb2xvcjQgb2JqZWN0XG4gICAgICovXG4gICAgZnVuY3Rpb24gdG9IZXhTdHJpbmcodmFsdWUpIHtcbiAgICAgICAgY29uc3QgaW50UiA9ICh2YWx1ZS5yICogMjU1KSB8IDA7XG4gICAgICAgIGNvbnN0IGludEcgPSAodmFsdWUuZyAqIDI1NSkgfCAwO1xuICAgICAgICBjb25zdCBpbnRCID0gKHZhbHVlLmIgKiAyNTUpIHwgMDtcbiAgICAgICAgY29uc3QgaW50QSA9ICh2YWx1ZS5hICogMjU1KSB8IDA7XG4gICAgICAgIHJldHVybiAoJyMnICtcbiAgICAgICAgICAgIFNjYWxhci50b0hleChpbnRSKSArXG4gICAgICAgICAgICBTY2FsYXIudG9IZXgoaW50RykgK1xuICAgICAgICAgICAgU2NhbGFyLnRvSGV4KGludEIpICtcbiAgICAgICAgICAgIFNjYWxhci50b0hleChpbnRBKSk7XG4gICAgfVxuICAgIENvbG9yNC50b0hleFN0cmluZyA9IHRvSGV4U3RyaW5nO1xuICAgIC8qKlxuICAgICAqIENvbXB1dGVzIGEgQ29sb3I0IGNvbnZlcnRlZCBmcm9tIHRoZSBjdXJyZW50IG9uZSB0byBsaW5lYXIgc3BhY2VcbiAgICAgKiBAcmV0dXJucyBjcmVhdGUgbXV0YWJsZSBDb2xvcjRcbiAgICAgKi9cbiAgICBmdW5jdGlvbiB0b0xpbmVhclNwYWNlKHZhbHVlKSB7XG4gICAgICAgIGNvbnN0IGNvbnZlcnRlZENvbG9yID0gY3JlYXRlKCk7XG4gICAgICAgIHRvTGluZWFyU3BhY2VUb1JlZih2YWx1ZSwgY29udmVydGVkQ29sb3IpO1xuICAgICAgICByZXR1cm4gY29udmVydGVkQ29sb3I7XG4gICAgfVxuICAgIENvbG9yNC50b0xpbmVhclNwYWNlID0gdG9MaW5lYXJTcGFjZTtcbiAgICAvKipcbiAgICAgKiBDb252ZXJ0cyB0aGUgQ29sb3I0IHZhbHVlcyB0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ICAgaWYgKG9uQ2hhbmdlRXhpc3RzIHx8IG9uU3VibWl0RXhpc3RzKSB7XG4gICAgICAgICAgICB1cGRhdGVPbkNoYW5nZShpbnN0YW5jZS5lbnRpdHksIGNvbXBvbmVudElkLCB7XG4gICAgICAgICAgICAgICAgb25DaGFuZ2VDYWxsYmFjazogb25DaGFuZ2UsXG4gICAgICAgICAgICAgICAgb25TdWJtaXRDYWxsYmFjazogb25TdWJtaXRcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgZGVsZXRlIHByb3BzLm9uQ2hhbmdlO1xuICAgICAgICAgICAgZGVsZXRlIHByb3BzLm9uU3VibWl0O1xuICAgICAgICB9XG4gICAgICAgIC8vIFdlIGNoZWNrIGlmIHRoZXJlIGlzIGFueSBrZXkgcGVuZGluZyB0byBiZSBjaGFuZ2VkIHRvIGF2b2lkIHVwZGF0aW5nIHRoZSBleGlzdGluZyBjb21wb25lbnRcbiAgICAgICAgaWYgKCFPYmplY3Qua2V5cyhwcm9wcykubGVuZ3RoKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgQ29tcG9uZW50RGVmID0gZW5naW5lLmdldENvbXBvbmVudChjb21wb25lbnRJZCk7XG4gICAgICAgIGNvbnN0IGNvbXBvbmVudCA9IENvbXBvbmVudERlZi5nZXRNdXRhYmxlT3JOdWxsKGluc3RhbmNlLmVudGl0eSkgfHwgQ29tcG9uZW50RGVmLmNyZWF0ZShpbnN0YW5jZS5lbnRpdHkpO1xuICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBwcm9wcykge1xuICAgICAgICAgICAgY29uc3Qga2V5UHJvcCA9IGtleTtcbiAgICAgICAgICAgIGNvbXBvbmVudFtrZXlQcm9wXSA9IHByb3BzW2tleVByb3BdO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZUNoaWxkRW50aXR5KGluc3RhbmNlKSB7XG4gICAgICAgIGNoYW5nZUV2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mFjaztcbiAgICAgICAgY29uc3Qgb25TdWJtaXRDYWxsYmFjayA9IHN0YXRlPy5vblN1Ym1pdENhbGxiYWNrO1xuICAgICAgICBjb25zdCB2YWx1ZSA9IHN0YXRlPy52YWx1ZSA/PyBvbGRTdGF0ZT8udmFsdWU7XG4gICAgICAgIGNvbnN0IGlzU3VibWl0ID0gc3RhdGU/LmlzU3VibWl0ID8/IG9sZFN0YXRlPy5pc1N1Ym1pdDtcbiAgICAgICAgZXZlbnQuc2V0KGNvbXBvbmVudElkLCB7IG9uQ2hhbmdlQ2FsbGJhY2ssIG9uU3VibWl0Q2FsbGJhY2ssIHZhbHVlLCBpc1N1Ym1pdCB9KTtcbiAgICB9XG4gICAgY29uc3QgaG9zdENvbmZpZyA9IHtcbiAgICAgICAgLi4ubm9vcENvbmZpZyxcbiAgICAgICAgY3JlYXRlSW5zdGFuY2UodHlwZSwgcHJvcHMpIHtcbiAgICAgICAgICAgIGNvbnN0IGVudGl0eSA9IGVuZ2luZS5hZGRFbnRpdHkoKTtcbiAgICAgICAgICAgIGVudGl0aWVzLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgY29uc3QgaW5zdGFuY2UgPSB7XG4gICAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICAgIF9jaGlsZDogW10sXG4gICAgICAgICAgICAgICAgcGFyZW50OiBDQU5WQVNfUk9PVF9FTlRJVFksXG4gICAgICAgICAgICAgICAgcmlnaHRPZjogdW5kZWZpbmVkXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gcHJvcHMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBrZXlUeXBlZCA9IGtleTtcbiAgICAgICAgICAgICAgICBpZiAoa2V5VHlwZWQgPT09ICdjaGlsZHJlbicgfHwga2V5VHlwZWQgPT09ICdrZXknKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaXNMaXN0ZW5lcihrZXlUeXBlZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdXBzZXJ0TGlzdGVuZXIoaW5zdGFuY2UsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdhZGQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHM6IHByb3BzW2tleVR5cGVkXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudDoga2V5VHlwZWRcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB1cHNlcnRDb21wb25lbnQoaW5zdGFuY2UsIHByb3BzW2tleVR5cGVkXSwga2V5VHlwZWQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBpbnN0YW5jZTtcbiAgICAgICAgfSxcbiAgICAgICAgYXBwZW5kQ2hpbGQsXG4gICAgICAgIGFwcGVuZENoaWxkVG9Db250YWluZXI6IGFwcGVuZENoaWxkLFxuICAgICAgICBhcHBlbmRJbml0aWFsQ2hpbGQ6IGFwcGVuZENoaWxkLFxuICAgICAgICByZW1vdmVDaGlsZDogcmVtb3ZlQ2hpbGQsXG4gICAgICAgIHByZXBhcmVVcGRhdGUoX2luc3RhbmNlLCBfdHlwZSwgb2xkUHJvcHMsIG5ld1Byb3BzKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50S2V5c1xuICAgICAgICAgICAgICAgIC5tYXAoKGNvbXBvbmVudCkgPT4gcHJvcHNDaGFuZ2VkKGNvbXBvbmVudCwgb2xkUHJvcHNbY29tcG9uZW50XSwgbmV3UHJvcHNbY29tcG9uZW50XSkpXG4gICAgICAgICAgICAgICAgLmZpbHRlcihpc05vdFVuZGVmaW5lZCk7XG4gICAgICAgIH0sXG4gICAgICAgIGNvbW1pdFVwZGF0ZShpbnN0YW5jZSwgdXBkYXRlUGF5bG9hZCwgX3R5cGUsIF9wcmV2UHJvcHMsIF9uZXh0UHJvcHMsIF9pbnRlcm5hbEhhbmRsZSkge1xuICAgICAgICAgICAgZm9yIChjb25zdCB1cGRhdGUgb2YgdXBkYXRlUGF5bG9hZCkge1xuICAgICAgICAgICAgICAgIGlmIChpc0xpc3RlbmVyKHVwZGF0ZS5jb21wb25lbnQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHVwc2VydExpc3RlbmVyKGluc3RhbmNlLCB1cGRhdGUpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHVwZGF0ZS50eXBlID09PSAnZGVsZXRlJykge1xuICAgICAgICAgICAgICAgICAgICByZW1vdmVDb21wb25lbnQoaW5zdGFuY2UsIHVwZGF0ZS5jb21wb25lbnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh1cGRhdGUucHJvcHMpIHtcbiAgICAgICAgICAgICAgICAgICAgdXBzZXJ0Q29tcG9uZW50KGluc3RhbmNlLCB1cGRhdGUucHJvcHMsIHVwZGF0ZS5jb21wb25lbnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgaW5zZXJ0QmVmb3JlKHBhcmVudEluc3RhbmNlLCBjaGlsZCwgYmVmb3JlQ2hpbGQpIHtcbiAgICAgICAgICAgIGNvbnN0IGJlZm9yZUNoaWxkSW5kZXggPSBwYXJlbnRJbnN0YW5jZS5fY2hpbGQuZmluZEluZGV4KChjKSA9PiBjLmVudGl0eSA9PT0gYmVmb3JlQ2hpbGQuZW50aXR5KTtcbiAgICAgICAgICAgIHBhcmVudEluc3RhbmNlLl9jaGlsZCA9IFtcbiAgICAgICAgICAgICAgICAuLi5wYXJlbnRJbnN0YW5jZS5fY2hpbGQuc2xpY2UoMCwgYmVmb3Jl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9uU3VibWl0Q2FsbGJhY2ssXG4gICAgICAgICAgICAgICAgdmFsdWU6IFJlc3VsdC52YWx1ZSxcbiAgICAgICAgICAgICAgICBpc1N1Ym1pdFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgICAgdXBkYXRlOiBmdW5jdGlvbiAoY29tcG9uZW50KSB7XG4gICAgICAgICAgICBpZiAoY2hhbmdlRXZlbnRzLnNpemUpIHtcbiAgICAgICAgICAgICAgICBoYW5kbGVPbkNoYW5nZShVaUlucHV0LmNvbXBvbmVudElkLCBVaUlucHV0UmVzdWx0KTtcbiAgICAgICAgICAgICAgICBoYW5kbGVPbkNoYW5nZShVaURyb3Bkb3duLmNvbXBvbmVudElkLCBVaURyb3Bkb3duUmVzdWx0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZWNvbmNpbGVyLnVwZGF0ZUNvbnRhaW5lcihjb21wb25lbnQsIHJvb3QsIG51bGwpO1xuICAgICAgICB9LFxuICAgICAgICBnZXRFbnRpdGllczogKCkgPT4gQXJyYXkuZnJvbShlbnRpdGllcylcbiAgICB9O1xufVxuIiwgImNvbnN0IHBhcnNlRm9udCA9IHtcbiAgICAnc2Fucy1zZXJpZic6IDAgLyogRm9udC5GX1NBTlNfU0VSSUYgKi8sXG4gICAgc2VyaWY6IDEgLyogRm9udC5GX1NFUklGICovLFxuICAgIG1vbm9zcGFjZTogMiAvKiBGb250LkZfTU9OT1NQQUNFICovXG59O1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldEZvbnQoZm9udCkge1xuICAgIGlmICghZm9udClcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICByZXR1cm4geyBmb250OiBwYXJzZUZvbnRbZm9udF0gfTtcbn1cbmNvbnN0IHBhcnNlVGV4dEFsaWduID0ge1xuICAgICd0b3AtbGVmdCc6IDAgLyogV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HZhbCksIDEgLyogWUdVbml0LllHVV9QT0lOVCAqL107XG4gICAgfVxuICAgIGlmIChpc1BlcmNlbnQodmFsKSkge1xuICAgICAgICByZXR1cm4gW2dldFZhbHVlKCclJywgdmFsKSwgMiAvKiBZR1VuaXQuWUdVX1BFUkNFTlQgKi9dO1xuICAgIH1cbiAgICBpZiAoaXNQb2ludCh2YWwpKSB7XG4gICAgICAgIHJldHVybiBbZ2V0VmFsdWUoJ3B4JywgdmFsKSwgMSAvKiBZR1VuaXQuWUdVX1BPSU5UICovXTtcbiAgICB9XG4gICAgcmV0dXJuIFt1bmRlZmluZWQsIDAgLyogWUdVbml0LllHVV9VTkRFRklORUQgKi9dO1xufVxuZXhwb3J0IGZ1bmN0aW9uIHBhcnNlUG9zaXRpb24ocG9zaXRpb24gPSB7fSwgcHJvcCkge1xuICAgIGlmICh0eXBlb2YgcG9zaXRpb24gPT09ICdvYmplY3QnKSB7XG4gICAgICAgIGNvbnN0IG9iaiA9IHt9O1xuICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBwb3NpdGlvbikge1xuICAgICAgICAgICAgY29uc3QgdHlwZWRLZXkgPSBrZXk7XG4gICAgICAgICAgICBjb25zdCBwcm9wS2V5ID0gYCR7cHJvcH0ke2NhcGl0YWxpemUodHlwZWRLZXkpfWA7XG4gICAgICAgICAgICBjb25zdCBwcm9wS2V5VW5pdCA9IGAke3Byb3B9JHtjYXBpdGFsaXplKHR5cGVkS2V5KX1Vbml0YDtcbiAgICAgICAgICAgIGNvbnN0IFt2YWx1ZSwgdW5pdF0gPSBwYXJzZVBvc2l0aW9uVW5pdChwb3NpdGlvblt0eXBlZEtleV0pO1xuICAgICAgICAgICAgaWYgKHZhbHVlID09PSB1bmRlZmluZWQpXG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICBvYmpbcHJvcEtleVVuaXRdID0gdW5pdDtcbiAgICAgICAgICAgIG9ialtwcm9wS2V5XSA9IHZhbHVlO1xuICAgICAgICB9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AgICAgIGFjdGlvbi5pZCA9IG5ld0lkXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAodHJpZ2dlci5jb25kaXRpb25zKSB7XG4gICAgICAgIGZvciAoY29uc3QgY29uZGl0aW9uIG9mIHRyaWdnZXIuY29uZGl0aW9ucykge1xuICAgICAgICAgIGlmIChjb25kaXRpb24uaWQpIHtcbiAgICAgICAgICAgIGNvbnN0IG5ld0lkID0gbmV3SWRzLmdldChjb25kaXRpb24uaWQpXG4gICAgICAgICAgICBpZiAobmV3SWQpIHtcbiAgICAgICAgICAgICAgY29uZGl0aW9uLmlkID0gbmV3SWRcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICByZXR1cm4gY2xvbmVkXG59XG4iLCAiaW1wb3J0IHtcbiAgRW50aXR5LFxuICBJRW5naW5lLFxuICBJU2NoZW1hLFxuICBNYXRlcmlhbENvbXBvbmVudERlZmluaXRpb25FeHRlbmRlZCxcbiAgUEJNYXRlcmlhbCxcbiAgUEJWaWRlb1BsYXllcixcbiAgU2NoZW1hcyxcbiAgVmlkZW9UZXh0dXJlLFxuICBBbmltYXRvckNvbXBvbmVudERlZmluaXRpb25FeHRlbmRlZCxcbiAgVHJhbnNmb3JtQ29tcG9uZW50RXh0ZW5kZWQsXG4gIExhc3RXcml0ZVdpbkVsZW1lbnRTZXRDb21wb25lbnREZWZpbml0aW9uLFxuICBQQkF1ZGlvU291cmNlLFxuICBQQkF2YXRhckF0dGFjaCxcbiAgUEJWaXNpYmlsaXR5Q29tcG9uZW50LFxuICBQQkdsdGZDb250YWluZXIsXG59IGZyb20gJ0BkY2wvc2RrL2VjcydcbmltcG9ydCB7IGFkZEFjdGlvblR5cGUgfSBmcm9tICcuL2FjdGlvbi10eXBlcydcbmltcG9ydCB7XG4gIENvbXBvbmVudE5hbWUsXG4gIFR3ZWVuVHlwZSxcbiAgSW50ZXJwb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W50KENvbXBvbmVudE5hbWUuVFJJR0dFUlMsIHtcbiAgICB2YWx1ZTogU2NoZW1hcy5BcnJheShcbiAgICAgIFNjaGVtYXMuTWFwKHtcbiAgICAgICAgdHlwZTogU2NoZW1hcy5FbnVtU3RyaW5nPFRyaWdnZXJUeXBlPihcbiAgICAgICAgICBUcmlnZ2VyVHlwZSxcbiAgICAgICAgICBUcmlnZ2VyVHlwZS5PTl9DTElDSyxcbiAgICAgICAgKSxcbiAgICAgICAgY29uZGl0aW9uczogU2NoZW1hcy5PcHRpb25hbChcbiAgICAgICAgICBTY2hlbWFzLkFycmF5KFxuICAgICAgICAgICAgU2NoZW1hcy5NYXAoe1xuICAgICAgICAgICAgICBpZDogU2NoZW1hcy5PcHRpb25hbChTY2hlbWFzLkludCksXG4gICAgICAgICAgICAgIHR5cGU6IFNjaGVtYXMuRW51bVN0cmluZzxUcmlnZ2VyQ29uZGl0aW9uVHlwZT4oXG4gICAgICAgICAgICAgICAgVHJpZ2dlckNvbmRpdGlvblR5cGUsXG4gICAgICAgICAgICAgICAgVHJpZ2dlckNvbmRpdGlvblR5cGUuV0hFTl9TVEFURV9JUyxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgdmFsdWU6IFNjaGVtYXMuU3RyaW5nLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgKSxcbiAgICAgICAgKSxcbiAgICAgICAgb3BlcmF0aW9uOiBTY2hlbWFzLk9wdGlvbmFsKFxuICAgICAgICAgIFNjaGVtYXMuRW51bVN0cmluZzxUcmlnZ2VyQ29uZGl0aW9uT3BlcmF0aW9uPihcbiAgICAgICAgICAgIFRyaWdnZXJDb25kaXRpb25PcGVyYXRpb24sXG4gICAgICAgICAgICBUcmlnZ2VyQ29uZGl0aW9uT3BlcmF0aW9uLkFORCxcbiAgICAgICAgICApLFxuICAgICAgICApLFxuICAgICAgICBhY3Rpb25zOiBTY2hlbWFzLkFycmF5KFxuICAgICAgICAgIFNjaGVtYXMuTWFwK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YW5kbGVTdG9wQW5pbWF0aW9uKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX0FOSU1BVElPTj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TRVRfU1RBVEU6IHtcbiAgICAgICAgICAgIGhhbmRsZVNldFN0YXRlKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNFVF9TVEFURT4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVEFSVF9UV0VFTjoge1xuICAgICAgICAgICAgaGFuZGxlU3RhcnRUd2VlbihlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVEFSVF9UV0VFTj4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TRVRfQ09VTlRFUjoge1xuICAgICAgICAgICAgaGFuZGxlU2V0Q291bnRlcihlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TRVRfQ09VTlRFUj4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5JTkNSRU1FTlRfQ09VTlRFUjoge1xuICAgICAgICAgICAgaGFuZGxlSW5jcmVtZW50Q291bnRlcihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuSU5DUkVNRU5UX0NPVU5URVI+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuREVDUkVBU0VfQ09VTlRFUjoge1xuICAgICAgICAgICAgaGFuZGxlRGVjcmVhc2VDb3VudGVyKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5ERUNSRUFTRV9DT1VOVEVSPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfU09VTkQ6IHtcbiAgICAgICAgICAgIGhhbmRsZVBsYXlTb3VuZChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5QTEFZX1NPVU5EPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUT1BfU09VTkQ6IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BTb3VuZChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX1NPVU5EPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNFVF9WSVNJQklMSVRZOiB7XG4gICAgICAgICAgICBoYW5kbGVTZXRWaXNpYmlsaXR5KFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TRVRfVklTSUJJTElUWT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5BVFRBQ0hfVE9fUExBWUVSOiB7XG4gICAgICAgICAgICBoYW5kbGVBdHRhY2hUb1BsYXllcihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuQVRUQUNIX1RPX1BMQVlFUj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5ERVRBQ0hfRlJPTV9QTEFZRVI6IHtcbiAgICAgICAgICAgIGhhbmRsZURldGFjaEZyb21QbGF5ZXIoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLkRFVEFDSF9GUk9NX1BMQVlFUj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5QTEFZX1ZJREVPX1NUUkVBTToge1xuICAgICAgICAgICAgaGFuZGxlUGxheVZpZGVvKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5QTEFZX1ZJREVPX1NUUkVBTT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX1ZJREVPX1NUUkVBTToge1xuICAgICAgICAgICAgaGFuZGxlU3RvcFZpZGVvKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX1ZJREVPX1NUUkVBTT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5QTEFZX0FVRElPX1NUUkVBTToge1xuICAgICAgICAgICAgaGFuZGxlUGxheUF1ZGlvU3RyZWFtKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5QTEFZX0FVRElPX1NUUkVBTT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX0FVRElPX1NUUkVBTToge1xuICAgICAgICAgICAgaGFuZGxlU3RvcEF1ZGlvU3RyZWFtKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX0FVRElPX1NUUkVBTT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5URUxFUE9SVF9QTEFZRVI6IHtcbiAgICAgICAgICAgIGhhbmRsZVRlbGVwb3J0UGxheWVyKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5URUxFUE9SVF9QTEFZRVI+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuTU9WRV9QTEFZRVI6IHtcbiAgICAgICAgICAgIGhhbmRsZU1vdmVQbGF5ZXIoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuTU9WRV9QTEFZRVI+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9ERUZBVUxUX0VNT1RFOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5RGVmYXVsdEVtb3RlKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5QTEFZX0RFRkFVTFRfRU1PVEU+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9DVVNUT01fRU1PVEU6IHtcbiAgICAgICAgICAgIGhhbmRsZVBsYXlDdXN0b21FbW90ZShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9DVVNUT01fRU1PVEU+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuT1BFTl9MSU5LOiB7XG4gICAgICAgICAgICBoYW5kbGVPcGVuTGluayhlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5PUEVOX0xJTks+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0hPV19URVhUOiB7XG4gICAgICAgICAgICBoYW5kbGVTaG93VGV4dChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TSE9XX1RFWFQ+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuSElERV9URVhUOiB7XG4gICAgICAgICAgICBoYW5kbGVIaWRlVGV4dChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5ISURFX1RFWFQ+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RBUlRfREVMQVk6IHtcbiAgICAgICAgICAgIGhhbmRsZVN0YXJ0RGVsYXkoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RBUlRfREVMQVk+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9ERUxBWToge1xuICAgICAgICAgICAgaGFuZGxlU3RvcERlbGF5KGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUT1BfREVMQVk+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RBUlRfTE9PUDoge1xuICAgICAgICAgICAgaGFuZGxlU3RhcnRMb29wKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUQVJUX0xPT1A+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9MT09QOiB7XG4gICAgICAgICAgICBoYW5kbGVTdG9wTG9vcChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX0xPT1A+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuQ0xPTkVfRU5USVRZOiB7XG4gICAgICAgICAgICBoYW5kbGVDbG9uZUVudGl0eShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuQ0xPTkVfRU5USVRZPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlJFTU9WRV9FTlRJVFk6IHtcbiAgICAgICAgICAgIGhhbmRsZVJlbW92ZUVudGl0eShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUkVNT1ZFX0VOVElUWT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfV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SBudWxsKSB7XG4gICAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRWYWx1ZSA9IGdldEN1cnJlbnRWYWx1ZShzdGF0ZXMpXG4gICAgICAgICAgICAgIHJldHVybiBjdXJyZW50VmFsdWUgIT09IGNvbmRpdGlvbi52YWx1ZVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBUcmlnZ2VyQ29uZGl0aW9uVHlwZS5XSEVOX0NPVU5URVJfRVFVQUxTOiB7XG4gICAgICAgICAgICBjb25zdCBjb3VudGVyID0gQ291bnRlci5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKGNvdW50ZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgY29uc3QgbnVtZXJpYyA9IE51bWJlcihjb25kaXRpb24udmFsdWUpXG4gICAgICAgICAgICAgIGlmICghaXNOYU4obnVtZXJpYykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY291bnRlci52YWx1ZSA9PT0gbnVtZXJpY1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIFRyaWdnZXJDb25kaXRpb25UeXBlLldIRU5fQ09VTlRFUl9JU19HUkVBVEVSX1RIQU46IHtcbiAgICAgICAgICAgIGNvbnN0IGNvdW50ZXIgPSBDb3VudGVyLmdldE9yTnVsbChlbnRpdHkpXG4gICAgICAgICAgICBpZiAoY291bnRlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb25zdCBudW1lcmljID0gTnVtYmVyKGNvbmRpdGlvbi52YWx1ZSlcbiAgICAgICAgICAgICAgaWYgKCFpc05hTihudW1lcmljKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb3VudGVyLnZhbHVlID4gbnVtZXJpY1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIFRyaWdnZXJDb25kaXRpb25UeXBlLldIRU5fQ09VTlRFUl9JU19MRVNTX1RIQU46IHtcbiAgICAgICAgICAgIGNvbnN0IGNvdW50ZXIgPSBDb3VudGVyLmdldE9yTnVsbChlbnRpdHkpXG4gICAgICAgICAgICBpZiAoY291bnRlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb25zdCBudW1lcmljID0gTnVtYmVyKGNvbmRpdGlvbi52YWx1ZSlcbiAgICAgICAgICAgICAgaWYgKCFpc05hTihudW1lcmljKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb3VudGVyLnZhbHVlIDwgbnVtZXJpY1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgY29uc29sZS5lcnJvcignRXJyb3IgaW4gY29uZGl0aW9uJywgY29uZGl0aW9uKVxuICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gZmFsc2VcbiAgfVxuXG4gIGZ1bmN0aW9uIGdldEVudGl0eUJ5SWQ8VCBleHRlbmRzIHsgaWQ6IG51bWJlciB9PihcbiAgICBjb21wb25lbnROYW1lOiBzdHJpbmcsXG4gICAgaWQ6IG51bWJlcixcbiAgKSB7XG4gICAgY29uc3QgQ29tcG9uZW50ID0gZW5naW5lLmdldENvbXBvbmVudChcbiAgICAgIGNvbXBvbmVudE5hbWUsXG4gICAgKSBhcyBMYXN0V3JpdGVXaW5FbGVtZW50U2V0Q29tcG9uZW50RGVmaW5pdGlvbjxUPlxuICAgIGNvbnN0IGVudGl0aWVzID0gQXJyYXkuZnJvbShlbmdpbmUuZ2V0RW50aXRpZXNXaXRoKENvbXBvbmVudCkpXG4gICAgY29uc3QgcmVzdWx0ID0gZW50aXRpZXMuZmluZCgoW19lbnRpdHksIHZhbHVlXSkgPT4gdmFsdWUuaWQgPT09IGlkKVxuICAgIHJldHVybiBBcnJheS5pc0FycmF5KHJlc3VsdCkgJiYgcmVzdWx0Lmxlbmd0aCA+IDAgPyByZXN1bHRbMF0gOiBudWxsXG4gIH1cblxuICBmdW5jdGlvbiBnZXRFbnRpdHlCeUFjdGlvbihhY3Rpb246IFRyaWdnZXJBY3Rpb24pIHtcbiAgICBpZiAoYWN0aW9uLmlkKSB7XG4gICAgICBjb25zdCBlbnRpdHkgPSBnZXRFbnRpdHlCeUlkKENvbXBvbmVudE5hbWUuQUNUSU9OUywgYWN0aW9uLmlkKVxuICAgICAgaWYgKGVudGl0eSkge1xuICAgICAgICByZXR1cm4gZW50aXR5XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBudWxsXG4gIH1cblxuICBmdW5jdGlvbiBnZXRFbnRpdHlCeUNvbmRpdGlvbihjb25kaXRpb246IFRyaWdnZXJDb25kaXRpb24pIHtcbiAgICBjb25zdCBjb21wb25lbnROYW1lID0gT2JqZWN0LnZhbHVlcyhDb21wb25lbnROYW1lKVxuICAgICAgLm1hcCgoY29tcG9uZW50TmFtZSkgPT4gKHtcbiAgICAgICAgY29tcG9uZW50TmFtZSxcbiAgICAgICAgY29uZGl0aW9uVHlwZXM6IGdldENvbmRpdGlvblR5cGVzQnlDb21wb25lbnROYW1lKGNvbXBvbmVudE5hbWUpLFxuICAgICAgfSkpXG4gICAgICAucmVkdWNlPENvbXBvbmVudE5hbWUgfCBudWxsPihcbiAgICAgICAgKHJlc3VsdCwgeyBjb21wb25lbnROYW1lLCBjb25kaXRpb25UeXBlcyB9KSA9PlxuICAgICAgICAgIGNvbmRpdGlvblR5cGVzLmluY2x1ZGVzKGNvbmRpdGlvbi50eXBlKSA/IGNvbXBvbmVudE5hbWUgOiByZXN1bHQsXG4gICAgICAgIG51bGwsXG4gICAgICApXG4gICAgaWYgKGNvbXBvbmVudE5hbWUgJiYgY29uZGl0aW9uLmlkKSB7XG4gICAgICBjb25zdCBlbn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Q2FtZXJhTW9kZUFyZWEiLCAiaW1wb3J0X0VuZ2luZUFwaSIsICJyZW5kZXJlclRyYW5zcG9ydCIsICJzZW5kQmF0Y2giXQp9Cg== diff --git a/bin/game.js.map b/bin/game.js.map index f417618..b2ceb00 100644 --- a/bin/game.js.map +++ b/bin/game.js.map @@ -1,8 +1,8 @@ { "version": 3, - "sources": ["../../node_modules/@protobufjs/aspromise/index.js", "../../node_modules/@protobufjs/base64/index.js", "../../node_modules/@protobufjs/eventemitter/index.js", "../../node_modules/@protobufjs/float/index.js", "../../node_modules/@protobufjs/inquire/index.js", "../../node_modules/@protobufjs/utf8/index.js", "../../node_modules/@protobufjs/pool/index.js", "../../node_modules/protobufjs/src/util/longbits.js", "../../node_modules/protobufjs/src/util/minimal.js", "../../node_modules/protobufjs/src/writer.js", "../../node_modules/protobufjs/src/writer_buffer.js", "../../node_modules/protobufjs/src/reader.js", "../../node_modules/protobufjs/src/reader_buffer.js", "../../node_modules/protobufjs/src/rpc/service.js", "../../node_modules/protobufjs/src/rpc.js", "../../node_modules/protobufjs/src/roots.js", "../../node_modules/protobufjs/src/index-minimal.js", "../../node_modules/protobufjs/minimal.js", "../src/index.ts.entry-point.ts", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/animator.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/Animator.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/audio_source.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/AudioSource.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/audio_stream.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/AudioStream.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/avatar_attach.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/AvatarAttach.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/avatar_modifier_area.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/common/vectors.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/AvatarModifierArea.gen.js", "../../node_modules/long/index.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/avatar_shape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/common/colors.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/AvatarShape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/billboard.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/Billboard.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/camera_mode.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/CameraMode.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/camera_mode_area.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/CameraModeArea.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/engine_info.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/EngineInfo.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/gltf_container.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/GltfContainer.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/gltf_container_loading_state.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/GltfContainerLoadingState.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/material.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/common/texture.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/Material.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/mesh_collider.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/MeshCollider.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/mesh_renderer.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/MeshRenderer.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/nft_shape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/NftShape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/pointer_events.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/PointerEvents.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/pointer_events_result.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/common/raycast_hit.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/PointerEventsResult.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/pointer_lock.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/PointerLock.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/raycast.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/Raycast.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/raycast_result.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/RaycastResult.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/text_shape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/TextShape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/tween.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/Tween.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/tween_sequence.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/TweenSequence.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/tween_state.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/TweenState.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_background.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/common/border_rect.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiBackground.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_canvas_information.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiCanvasInformation.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_dropdown.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiDropdown.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_dropdown_result.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiDropdownResult.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_input.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiInput.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_input_result.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiInputResult.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_text.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiText.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_transform.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiTransform.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/video_event.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/VideoEvent.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/video_player.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/VideoPlayer.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/visibility_component.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/VisibilityComponent.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/index.gen.js", "../node_modules/@dcl/ecs/dist/components/extended/Animator.js", "../node_modules/@dcl/ecs/dist/components/extended/MeshCollider.js", "../node_modules/@dcl/ecs/dist/components/extended/Tween.js", "../node_modules/@dcl/ecs/dist/schemas/Array.js", "../node_modules/@dcl/ecs/dist/schemas/basic/Boolean.js", "../node_modules/@dcl/ecs/dist/schemas/basic/Integer.js", "../node_modules/@dcl/ecs/dist/schemas/basic/String.js", "../node_modules/@dcl/ecs/dist/schemas/basic/Enum.js", "../node_modules/@dcl/ecs/dist/schemas/basic/Float.js", "../node_modules/@dcl/ecs/dist/schemas/custom/Color3.js", "../node_modules/@dcl/ecs/dist/schemas/custom/Color4.js", "../node_modules/@dcl/ecs/dist/schemas/custom/Entity.js", "../node_modules/@dcl/ecs/dist/schemas/custom/Quaternion.js", "../node_modules/@dcl/ecs/dist/schemas/custom/Vector3.js", "../node_modules/@dcl/ecs/dist/schemas/Map.js", "../node_modules/@dcl/ecs/dist/schemas/Optional.js", "../node_modules/@dcl/ecs/dist/schemas/OneOf.js", "../node_modules/@dcl/ecs/dist/schemas/buildSchema/utils.js", "../node_modules/@dcl/ecs/dist/schemas/buildSchema/index.js", "../node_modules/@dcl/ecs/dist/schemas/index.js", "../node_modules/@dcl/ecs/dist/components/manual/Name.js", "../node_modules/@dcl/ecs/dist/components/manual/SyncComponents.js", "../node_modules/@dcl/ecs/dist/components/manual/NetworkEntity.js", "../node_modules/@dcl/ecs/dist/components/manual/NetworkParent.js", "../node_modules/@dcl/ecs/dist/components/manual/Transform.js", "../node_modules/@dcl/ecs/dist/components/index.js", "../node_modules/@dcl/ecs/dist/components/generated/component-names.gen.js", "../node_modules/@dcl/ecs/dist/components/component-number.js", "../node_modules/@dcl/ecs/dist/runtime/crc.js", "../node_modules/@dcl/ecs/dist/runtime/invariant.js", "../node_modules/@dcl/ecs/dist/systems/crdt/gset.js", "../node_modules/@dcl/ecs/dist/engine/entity.js", "../node_modules/@dcl/ecs/dist/serialization/ByteBuffer/index.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/types.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/crdtMessageProtocol.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/deleteComponent.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/appendValue.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/deleteEntity.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/putComponent.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/network/putComponentNetwork.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/network/deleteComponentNetwork.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/network/deleteEntityNetwork.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/network/utils.js", "../node_modules/@dcl/ecs/dist/systems/crdt/index.js", "../node_modules/@dcl/ecs/dist/systems/crdt/utils.js", "../node_modules/@dcl/ecs/dist/engine/readonly.js", "../node_modules/@dcl/ecs/dist/engine/lww-element-set-component-definition.js", "../node_modules/@dcl/ecs/dist/engine/systems.js", "../node_modules/@dcl/ecs/dist/engine/grow-only-value-set-component-definition.js", "../node_modules/@dcl/ecs/dist/runtime/helpers/tree.js", "../node_modules/@dcl/ecs/dist/engine/input.js", "../node_modules/@dcl/ecs/dist/engine/component.js", "../node_modules/@dcl/ecs/dist/engine/index.js", "../node_modules/@dcl/ecs/dist/systems/async-task.js", "../node_modules/@dcl/ecs/dist/systems/tween.js", "../node_modules/@dcl/ecs/dist/runtime/initialization/index.js", "../node_modules/@dcl/ecs/dist/components/generated/global.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/common/camera_type.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/common/input_action.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/common/loading_state.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/common/texts.gen.js", "../node_modules/@dcl/ecs/dist/composite/components.js", "../node_modules/@dcl/ecs/dist/composite/path.js", "../node_modules/@dcl/ecs/dist/composite/instance.js", "../node_modules/@dcl/ecs/dist/composite/proto/gen/composite.gen.js", "../node_modules/@dcl/ecs/dist/composite/proto/gen/google/protobuf/struct.gen.js", "../node_modules/@dcl/ecs/dist/composite/index.js", "../node_modules/@dcl/ecs/dist/index.js", "../../node_modules/@dcl/ecs-math/dist/types.js", "../../node_modules/@dcl/ecs-math/dist/Scalar.js", "../../node_modules/@dcl/ecs-math/dist/Vector3.js", "../../node_modules/@dcl/ecs-math/dist/Plane.js", "../../node_modules/@dcl/ecs-math/dist/Matrix.js", "../../node_modules/@dcl/ecs-math/dist/Quaternion.js", "../../node_modules/@dcl/ecs-math/dist/Color4.js", "../../node_modules/@dcl/ecs-math/dist/Color3.js", "../src/definitions.ts", "../node_modules/@dcl/sdk/src/network/message-bus-sync.ts", "../node_modules/@dcl/sdk/src/network/filter.ts", "../node_modules/@dcl/sdk/src/network/state.ts", "../node_modules/@dcl/ecs/dist/serialization/crdt/message.js", "../node_modules/@dcl/sdk/src/internal/transports/logger.ts", "../node_modules/@dcl/sdk/src/network/binary-message-bus.ts", "../node_modules/@dcl/sdk/src/network/utils.ts", "../node_modules/@dcl/sdk/src/network/entities.ts", "../node_modules/@dcl/sdk/src/network/index.ts", "../src/modules/factory.ts", "../src/modules/helpers.ts", "../src/modules/beerGlass.ts", "../src/modules/tap.ts", "../src/index.ts", "../node_modules/@dcl/sdk/src/index.ts", "../node_modules/@dcl/sdk/src/internal/transports/rendererTransport.ts", "../node_modules/@dcl/sdk/src/internal/Observable.ts", "../node_modules/@dcl/sdk/src/observables.ts", "sdk-composite:all-composites", "../node_modules/@dcl/sdk/src/composite-provider.ts"], - "sourceRoot": "file:///Users/Nico/Documents/github/Goerli-Plaza/beer-dispenser/bin", - "sourcesContent": ["\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n", "\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n", "\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n", "\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n", "\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n", "\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(\"../util/minimal\");\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n", "\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(\"@protobufjs/aspromise\");\n\n// converts to / from base64 encoded strings\nutil.base64 = require(\"@protobufjs/base64\");\n\n// base class of rpc.Service\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\n\n// float handling accross browsers\nutil.float = require(\"@protobufjs/float\");\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(\"@protobufjs/inquire\");\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(\"@protobufjs/utf8\");\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(\"@protobufjs/pool\");\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(\"./longbits\");\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n", "\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n", "\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(\"./writer\");\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n", "\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n", "\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(\"./reader\");\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n", "\"use strict\";\nmodule.exports = Service;\n\nvar util = require(\"../util/minimal\");\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n", "\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(\"./rpc/service\");\n", "\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n", "\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(\"./writer\");\nprotobuf.BufferWriter = require(\"./writer_buffer\");\nprotobuf.Reader = require(\"./reader\");\nprotobuf.BufferReader = require(\"./reader_buffer\");\n\n// Utility\nprotobuf.util = require(\"./util/minimal\");\nprotobuf.rpc = require(\"./rpc\");\nprotobuf.roots = require(\"./roots\");\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n", "// minimal library entry point.\n\n\"use strict\";\nmodule.exports = require(\"./src/index-minimal\");\n", "// BEGIN AUTO GENERATED CODE \"~sdk/scene-entrypoint\"\n\"use strict\";\nimport * as entrypoint from '/Users/Nico/Documents/github/Goerli-Plaza/beer-dispenser/src/index.ts'\nimport { engine } from '@dcl/sdk/ecs'\nimport * as sdk from '@dcl/sdk'\n\nif ((entrypoint as any).main !== undefined) {\n function _INTERNAL_startup_system() {\n const maybePromise = (entrypoint as any).main()\n if (maybePromise && typeof maybePromise === 'object' && typeof (maybePromise as unknown as Promise).then === 'function') {\n maybePromise.catch(console.error)\n }\n engine.removeSystem(_INTERNAL_startup_system)\n }\n engine.addSystem(_INTERNAL_startup_system, Infinity)\n}\n\nexport * from '@dcl/sdk'\nexport * from '/Users/Nico/Documents/github/Goerli-Plaza/beer-dispenser/src/index.ts'\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBAnimator() {\n return { states: [] };\n}\n/**\n * @public\n */\nexport var PBAnimator;\n(function (PBAnimator) {\n function encode(message, writer = _m0.Writer.create()) {\n for (const v of message.states) {\n PBAnimationState.encode(v, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n }\n PBAnimator.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAnimator();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.states.push(PBAnimationState.decode(reader, reader.uint32()));\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAnimator.decode = decode;\n})(PBAnimator || (PBAnimator = {}));\nfunction createBasePBAnimationState() {\n return { clip: \"\", playing: undefined, weight: undefined, speed: undefined, loop: undefined, shouldReset: undefined };\n}\n/**\n * @public\n */\nexport var PBAnimationState;\n(function (PBAnimationState) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.clip !== \"\") {\n writer.uint32(18).string(message.clip);\n }\n if (message.playing !== undefined) {\n writer.uint32(24).bool(message.playing);\n }\n if (message.weight !== undefined) {\n writer.uint32(37).float(message.weight);\n }\n if (message.speed !== undefined) {\n writer.uint32(45).float(message.speed);\n }\n if (message.loop !== undefined) {\n writer.uint32(48).bool(message.loop);\n }\n if (message.shouldReset !== undefined) {\n writer.uint32(56).bool(message.shouldReset);\n }\n return writer;\n }\n PBAnimationState.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAnimationState();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 2:\n if (tag !== 18) {\n break;\n }\n message.clip = reader.string();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.playing = reader.bool();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.weight = reader.float();\n continue;\n case 5:\n if (tag !== 45) {\n break;\n }\n message.speed = reader.float();\n continue;\n case 6:\n if (tag !== 48) {\n break;\n }\n message.loop = reader.bool();\n continue;\n case 7:\n if (tag !== 56) {\n break;\n }\n message.shouldReset = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAnimationState.decode = decode;\n})(PBAnimationState || (PBAnimationState = {}));\n", "import { PBAnimator } from './pb/decentraland/sdk/components/animator.gen';\n/**\n * @internal\n */\nexport const AnimatorSchema = {\n COMPONENT_ID: 1042,\n serialize(value, builder) {\n const writer = PBAnimator.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAnimator.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAnimator.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAnimator\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBAudioSource() {\n return { playing: undefined, volume: undefined, loop: undefined, pitch: undefined, audioClipUrl: \"\" };\n}\n/**\n * @public\n */\nexport var PBAudioSource;\n(function (PBAudioSource) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.playing !== undefined) {\n writer.uint32(8).bool(message.playing);\n }\n if (message.volume !== undefined) {\n writer.uint32(21).float(message.volume);\n }\n if (message.loop !== undefined) {\n writer.uint32(24).bool(message.loop);\n }\n if (message.pitch !== undefined) {\n writer.uint32(37).float(message.pitch);\n }\n if (message.audioClipUrl !== \"\") {\n writer.uint32(42).string(message.audioClipUrl);\n }\n return writer;\n }\n PBAudioSource.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAudioSource();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.playing = reader.bool();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.volume = reader.float();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.loop = reader.bool();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.pitch = reader.float();\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.audioClipUrl = reader.string();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAudioSource.decode = decode;\n})(PBAudioSource || (PBAudioSource = {}));\n", "import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';\n/**\n * @internal\n */\nexport const AudioSourceSchema = {\n COMPONENT_ID: 1020,\n serialize(value, builder) {\n const writer = PBAudioSource.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAudioSource.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAudioSource.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAudioSource\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBAudioStream() {\n return { playing: undefined, volume: undefined, url: \"\" };\n}\n/**\n * @public\n */\nexport var PBAudioStream;\n(function (PBAudioStream) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.playing !== undefined) {\n writer.uint32(8).bool(message.playing);\n }\n if (message.volume !== undefined) {\n writer.uint32(21).float(message.volume);\n }\n if (message.url !== \"\") {\n writer.uint32(26).string(message.url);\n }\n return writer;\n }\n PBAudioStream.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAudioStream();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.playing = reader.bool();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.volume = reader.float();\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.url = reader.string();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAudioStream.decode = decode;\n})(PBAudioStream || (PBAudioStream = {}));\n", "import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';\n/**\n * @internal\n */\nexport const AudioStreamSchema = {\n COMPONENT_ID: 1021,\n serialize(value, builder) {\n const writer = PBAudioStream.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAudioStream.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAudioStream.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAudioStream\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */\n/**\n * @public\n */\nexport var AvatarAnchorPointType;\n(function (AvatarAnchorPointType) {\n AvatarAnchorPointType[AvatarAnchorPointType[\"AAPT_POSITION\"] = 0] = \"AAPT_POSITION\";\n AvatarAnchorPointType[AvatarAnchorPointType[\"AAPT_NAME_TAG\"] = 1] = \"AAPT_NAME_TAG\";\n AvatarAnchorPointType[AvatarAnchorPointType[\"AAPT_LEFT_HAND\"] = 2] = \"AAPT_LEFT_HAND\";\n AvatarAnchorPointType[AvatarAnchorPointType[\"AAPT_RIGHT_HAND\"] = 3] = \"AAPT_RIGHT_HAND\";\n})(AvatarAnchorPointType || (AvatarAnchorPointType = {}));\nfunction createBasePBAvatarAttach() {\n return { avatarId: undefined, anchorPointId: 0 };\n}\n/**\n * @public\n */\nexport var PBAvatarAttach;\n(function (PBAvatarAttach) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.avatarId !== undefined) {\n writer.uint32(10).string(message.avatarId);\n }\n if (message.anchorPointId !== 0) {\n writer.uint32(16).int32(message.anchorPointId);\n }\n return writer;\n }\n PBAvatarAttach.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAvatarAttach();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.avatarId = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.anchorPointId = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAvatarAttach.decode = decode;\n})(PBAvatarAttach || (PBAvatarAttach = {}));\n", "import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.gen';\n/**\n * @internal\n */\nexport const AvatarAttachSchema = {\n COMPONENT_ID: 1073,\n serialize(value, builder) {\n const writer = PBAvatarAttach.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAvatarAttach.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAvatarAttach.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAvatarAttach\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Vector3 } from \"../../common/vectors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/** AvatarModifierType is an effect that should be applied to avatars inside the region. */\n/**\n * @public\n */\nexport var AvatarModifierType;\n(function (AvatarModifierType) {\n /** AMT_HIDE_AVATARS - avatars are invisible */\n AvatarModifierType[AvatarModifierType[\"AMT_HIDE_AVATARS\"] = 0] = \"AMT_HIDE_AVATARS\";\n /** AMT_DISABLE_PASSPORTS - selecting (e.g. clicking) an avatar will not bring up their profile. */\n AvatarModifierType[AvatarModifierType[\"AMT_DISABLE_PASSPORTS\"] = 1] = \"AMT_DISABLE_PASSPORTS\";\n})(AvatarModifierType || (AvatarModifierType = {}));\nfunction createBasePBAvatarModifierArea() {\n return { area: undefined, excludeIds: [], modifiers: [] };\n}\n/**\n * @public\n */\nexport var PBAvatarModifierArea;\n(function (PBAvatarModifierArea) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.area !== undefined) {\n Vector3.encode(message.area, writer.uint32(10).fork()).ldelim();\n }\n for (const v of message.excludeIds) {\n writer.uint32(18).string(v);\n }\n writer.uint32(26).fork();\n for (const v of message.modifiers) {\n writer.int32(v);\n }\n writer.ldelim();\n return writer;\n }\n PBAvatarModifierArea.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAvatarModifierArea();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.area = Vector3.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.excludeIds.push(reader.string());\n continue;\n case 3:\n if (tag === 24) {\n message.modifiers.push(reader.int32());\n continue;\n }\n if (tag === 26) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.modifiers.push(reader.int32());\n }\n continue;\n }\n break;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAvatarModifierArea.decode = decode;\n})(PBAvatarModifierArea || (PBAvatarModifierArea = {}));\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.common\";\nfunction createBasePosition() {\n return { x: 0, y: 0, z: 0 };\n}\n/**\n * @public\n */\nexport var Position;\n(function (Position) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.x !== 0) {\n writer.uint32(13).float(message.x);\n }\n if (message.y !== 0) {\n writer.uint32(21).float(message.y);\n }\n if (message.z !== 0) {\n writer.uint32(29).float(message.z);\n }\n return writer;\n }\n Position.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePosition();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.x = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.y = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.z = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Position.decode = decode;\n})(Position || (Position = {}));\nfunction createBaseVector3() {\n return { x: 0, y: 0, z: 0 };\n}\n/**\n * @public\n */\nexport var Vector3;\n(function (Vector3) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.x !== 0) {\n writer.uint32(13).float(message.x);\n }\n if (message.y !== 0) {\n writer.uint32(21).float(message.y);\n }\n if (message.z !== 0) {\n writer.uint32(29).float(message.z);\n }\n return writer;\n }\n Vector3.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVector3();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.x = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.y = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.z = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Vector3.decode = decode;\n})(Vector3 || (Vector3 = {}));\nfunction createBaseVector2() {\n return { x: 0, y: 0 };\n}\n/**\n * @public\n */\nexport var Vector2;\n(function (Vector2) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.x !== 0) {\n writer.uint32(13).float(message.x);\n }\n if (message.y !== 0) {\n writer.uint32(21).float(message.y);\n }\n return writer;\n }\n Vector2.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVector2();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.x = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.y = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Vector2.decode = decode;\n})(Vector2 || (Vector2 = {}));\nfunction createBaseQuaternion() {\n return { x: 0, y: 0, z: 0, w: 0 };\n}\n/**\n * @public\n */\nexport var Quaternion;\n(function (Quaternion) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.x !== 0) {\n writer.uint32(13).float(message.x);\n }\n if (message.y !== 0) {\n writer.uint32(21).float(message.y);\n }\n if (message.z !== 0) {\n writer.uint32(29).float(message.z);\n }\n if (message.w !== 0) {\n writer.uint32(37).float(message.w);\n }\n return writer;\n }\n Quaternion.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseQuaternion();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.x = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.y = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.z = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.w = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Quaternion.decode = decode;\n})(Quaternion || (Quaternion = {}));\n", "import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';\n/**\n * @internal\n */\nexport const AvatarModifierAreaSchema = {\n COMPONENT_ID: 1070,\n serialize(value, builder) {\n const writer = PBAvatarModifierArea.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAvatarModifierArea.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAvatarModifierArea.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAvatarModifierArea\"\n }\n};\n", "/**\n * @license\n * Copyright 2009 The Closure Library Authors\n * Copyright 2020 Daniel Wirtz / The long.js Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// WebAssembly optimizations to do native i64 multiplication and divide\nvar wasm = null;\ntry {\n wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([\n 0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11\n ])), {}).exports;\n} catch (e) {\n // no wasm support :(\n}\n\n/**\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\n * See the from* functions below for more convenient ways of constructing Longs.\n * @exports Long\n * @class A Long class for representing a 64 bit two's-complement integer value.\n * @param {number} low The low (signed) 32 bits of the long\n * @param {number} high The high (signed) 32 bits of the long\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @constructor\n */\nfunction Long(low, high, unsigned) {\n\n /**\n * The low 32 bits as a signed value.\n * @type {number}\n */\n this.low = low | 0;\n\n /**\n * The high 32 bits as a signed value.\n * @type {number}\n */\n this.high = high | 0;\n\n /**\n * Whether unsigned or not.\n * @type {boolean}\n */\n this.unsigned = !!unsigned;\n}\n\n// The internal representation of a long is the two given signed, 32-bit values.\n// We use 32-bit pieces because these are the size of integers on which\n// Javascript performs bit-operations. For operations like addition and\n// multiplication, we split each number into 16 bit pieces, which can easily be\n// multiplied within Javascript's floating-point representation without overflow\n// or change in sign.\n//\n// In the algorithms below, we frequently reduce the negative case to the\n// positive case by negating the input(s) and then post-processing the result.\n// Note that we must ALWAYS check specially whether those values are MIN_VALUE\n// (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\n// a positive number, it overflows back into a negative). Not handling this\n// case would often result in infinite recursion.\n//\n// Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\n// methods on which they depend.\n\n/**\n * An indicator used to reliably determine if an object is a Long or not.\n * @type {boolean}\n * @const\n * @private\n */\nLong.prototype.__isLong__;\n\nObject.defineProperty(Long.prototype, \"__isLong__\", { value: true });\n\n/**\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n * @inner\n */\nfunction isLong(obj) {\n return (obj && obj[\"__isLong__\"]) === true;\n}\n\n/**\n * @function\n * @param {*} value number\n * @returns {number}\n * @inner\n */\nfunction ctz32(value) {\n var c = Math.clz32(value & -value);\n return value ? 31 - c : c;\n}\n\n/**\n * Tests if the specified object is a Long.\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n */\nLong.isLong = isLong;\n\n/**\n * A cache of the Long representations of small integer values.\n * @type {!Object}\n * @inner\n */\nvar INT_CACHE = {};\n\n/**\n * A cache of the Long representations of small unsigned integer values.\n * @type {!Object}\n * @inner\n */\nvar UINT_CACHE = {};\n\n/**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromInt(value, unsigned) {\n var obj, cachedObj, cache;\n if (unsigned) {\n value >>>= 0;\n if (cache = (0 <= value && value < 256)) {\n cachedObj = UINT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, 0, true);\n if (cache)\n UINT_CACHE[value] = obj;\n return obj;\n } else {\n value |= 0;\n if (cache = (-128 <= value && value < 128)) {\n cachedObj = INT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, value < 0 ? -1 : 0, false);\n if (cache)\n INT_CACHE[value] = obj;\n return obj;\n }\n}\n\n/**\n * Returns a Long representing the given 32 bit integer value.\n * @function\n * @param {number} value The 32 bit integer in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\nLong.fromInt = fromInt;\n\n/**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromNumber(value, unsigned) {\n if (isNaN(value))\n return unsigned ? UZERO : ZERO;\n if (unsigned) {\n if (value < 0)\n return UZERO;\n if (value >= TWO_PWR_64_DBL)\n return MAX_UNSIGNED_VALUE;\n } else {\n if (value <= -TWO_PWR_63_DBL)\n return MIN_VALUE;\n if (value + 1 >= TWO_PWR_63_DBL)\n return MAX_VALUE;\n }\n if (value < 0)\n return fromNumber(-value, unsigned).neg();\n return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);\n}\n\n/**\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\n * @function\n * @param {number} value The number in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\nLong.fromNumber = fromNumber;\n\n/**\n * @param {number} lowBits\n * @param {number} highBits\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromBits(lowBits, highBits, unsigned) {\n return new Long(lowBits, highBits, unsigned);\n}\n\n/**\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\n * assumed to use 32 bits.\n * @function\n * @param {number} lowBits The low 32 bits\n * @param {number} highBits The high 32 bits\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\nLong.fromBits = fromBits;\n\n/**\n * @function\n * @param {number} base\n * @param {number} exponent\n * @returns {number}\n * @inner\n */\nvar pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\n\n/**\n * @param {string} str\n * @param {(boolean|number)=} unsigned\n * @param {number=} radix\n * @returns {!Long}\n * @inner\n */\nfunction fromString(str, unsigned, radix) {\n if (str.length === 0)\n throw Error('empty string');\n if (typeof unsigned === 'number') {\n // For goog.math.long compatibility\n radix = unsigned;\n unsigned = false;\n } else {\n unsigned = !!unsigned;\n }\n if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\n return unsigned ? UZERO : ZERO;\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError('radix');\n\n var p;\n if ((p = str.indexOf('-')) > 0)\n throw Error('interior hyphen');\n else if (p === 0) {\n return fromString(str.substring(1), unsigned, radix).neg();\n }\n\n // Do several (8) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 8));\n\n var result = ZERO;\n for (var i = 0; i < str.length; i += 8) {\n var size = Math.min(8, str.length - i),\n value = parseInt(str.substring(i, i + size), radix);\n if (size < 8) {\n var power = fromNumber(pow_dbl(radix, size));\n result = result.mul(power).add(fromNumber(value));\n } else {\n result = result.mul(radixToPower);\n result = result.add(fromNumber(value));\n }\n }\n result.unsigned = unsigned;\n return result;\n}\n\n/**\n * Returns a Long representation of the given string, written using the specified radix.\n * @function\n * @param {string} str The textual representation of the Long\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\n * @returns {!Long} The corresponding Long value\n */\nLong.fromString = fromString;\n\n/**\n * @function\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromValue(val, unsigned) {\n if (typeof val === 'number')\n return fromNumber(val, unsigned);\n if (typeof val === 'string')\n return fromString(val, unsigned);\n // Throws for non-objects, converts non-instanceof Long:\n return fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);\n}\n\n/**\n * Converts the specified value to a Long using the appropriate from* function for its type.\n * @function\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long}\n */\nLong.fromValue = fromValue;\n\n// NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\n// no runtime penalty for these.\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_16_DBL = 1 << 16;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_24_DBL = 1 << 24;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\n\n/**\n * @type {!Long}\n * @const\n * @inner\n */\nvar TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\n\n/**\n * @type {!Long}\n * @inner\n */\nvar ZERO = fromInt(0);\n\n/**\n * Signed zero.\n * @type {!Long}\n */\nLong.ZERO = ZERO;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar UZERO = fromInt(0, true);\n\n/**\n * Unsigned zero.\n * @type {!Long}\n */\nLong.UZERO = UZERO;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar ONE = fromInt(1);\n\n/**\n * Signed one.\n * @type {!Long}\n */\nLong.ONE = ONE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar UONE = fromInt(1, true);\n\n/**\n * Unsigned one.\n * @type {!Long}\n */\nLong.UONE = UONE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar NEG_ONE = fromInt(-1);\n\n/**\n * Signed negative one.\n * @type {!Long}\n */\nLong.NEG_ONE = NEG_ONE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar MAX_VALUE = fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0, false);\n\n/**\n * Maximum signed value.\n * @type {!Long}\n */\nLong.MAX_VALUE = MAX_VALUE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF | 0, 0xFFFFFFFF | 0, true);\n\n/**\n * Maximum unsigned value.\n * @type {!Long}\n */\nLong.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar MIN_VALUE = fromBits(0, 0x80000000 | 0, false);\n\n/**\n * Minimum signed value.\n * @type {!Long}\n */\nLong.MIN_VALUE = MIN_VALUE;\n\n/**\n * @alias Long.prototype\n * @inner\n */\nvar LongPrototype = Long.prototype;\n\n/**\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\n * @this {!Long}\n * @returns {number}\n */\nLongPrototype.toInt = function toInt() {\n return this.unsigned ? this.low >>> 0 : this.low;\n};\n\n/**\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\n * @this {!Long}\n * @returns {number}\n */\nLongPrototype.toNumber = function toNumber() {\n if (this.unsigned)\n return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0);\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\n};\n\n/**\n * Converts the Long to a string written in the specified radix.\n * @this {!Long}\n * @param {number=} radix Radix (2-36), defaults to 10\n * @returns {string}\n * @override\n * @throws {RangeError} If `radix` is out of range\n */\nLongPrototype.toString = function toString(radix) {\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError('radix');\n if (this.isZero())\n return '0';\n if (this.isNegative()) { // Unsigned Longs are never negative\n if (this.eq(MIN_VALUE)) {\n // We need to change the Long value before it can be negated, so we remove\n // the bottom-most digit in this base and then recurse to do the rest.\n var radixLong = fromNumber(radix),\n div = this.div(radixLong),\n rem1 = div.mul(radixLong).sub(this);\n return div.toString(radix) + rem1.toInt().toString(radix);\n } else\n return '-' + this.neg().toString(radix);\n }\n\n // Do several (6) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\n rem = this;\n var result = '';\n while (true) {\n var remDiv = rem.div(radixToPower),\n intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\n digits = intval.toString(radix);\n rem = remDiv;\n if (rem.isZero())\n return digits + result;\n else {\n while (digits.length < 6)\n digits = '0' + digits;\n result = '' + digits + result;\n }\n }\n};\n\n/**\n * Gets the high 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed high bits\n */\nLongPrototype.getHighBits = function getHighBits() {\n return this.high;\n};\n\n/**\n * Gets the high 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned high bits\n */\nLongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\n return this.high >>> 0;\n};\n\n/**\n * Gets the low 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed low bits\n */\nLongPrototype.getLowBits = function getLowBits() {\n return this.low;\n};\n\n/**\n * Gets the low 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned low bits\n */\nLongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\n return this.low >>> 0;\n};\n\n/**\n * Gets the number of bits needed to represent the absolute value of this Long.\n * @this {!Long}\n * @returns {number}\n */\nLongPrototype.getNumBitsAbs = function getNumBitsAbs() {\n if (this.isNegative()) // Unsigned Longs are never negative\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\n var val = this.high != 0 ? this.high : this.low;\n for (var bit = 31; bit > 0; bit--)\n if ((val & (1 << bit)) != 0)\n break;\n return this.high != 0 ? bit + 33 : bit + 1;\n};\n\n/**\n * Tests if this Long's value equals zero.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isZero = function isZero() {\n return this.high === 0 && this.low === 0;\n};\n\n/**\n * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}.\n * @returns {boolean}\n */\nLongPrototype.eqz = LongPrototype.isZero;\n\n/**\n * Tests if this Long's value is negative.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isNegative = function isNegative() {\n return !this.unsigned && this.high < 0;\n};\n\n/**\n * Tests if this Long's value is positive or zero.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isPositive = function isPositive() {\n return this.unsigned || this.high >= 0;\n};\n\n/**\n * Tests if this Long's value is odd.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isOdd = function isOdd() {\n return (this.low & 1) === 1;\n};\n\n/**\n * Tests if this Long's value is even.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isEven = function isEven() {\n return (this.low & 1) === 0;\n};\n\n/**\n * Tests if this Long's value equals the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.equals = function equals(other) {\n if (!isLong(other))\n other = fromValue(other);\n if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1)\n return false;\n return this.high === other.high && this.low === other.low;\n};\n\n/**\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.eq = LongPrototype.equals;\n\n/**\n * Tests if this Long's value differs from the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.notEquals = function notEquals(other) {\n return !this.eq(/* validates */ other);\n};\n\n/**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.neq = LongPrototype.notEquals;\n\n/**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.ne = LongPrototype.notEquals;\n\n/**\n * Tests if this Long's value is less than the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lessThan = function lessThan(other) {\n return this.comp(/* validates */ other) < 0;\n};\n\n/**\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lt = LongPrototype.lessThan;\n\n/**\n * Tests if this Long's value is less than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\n return this.comp(/* validates */ other) <= 0;\n};\n\n/**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lte = LongPrototype.lessThanOrEqual;\n\n/**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.le = LongPrototype.lessThanOrEqual;\n\n/**\n * Tests if this Long's value is greater than the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.greaterThan = function greaterThan(other) {\n return this.comp(/* validates */ other) > 0;\n};\n\n/**\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.gt = LongPrototype.greaterThan;\n\n/**\n * Tests if this Long's value is greater than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\n return this.comp(/* validates */ other) >= 0;\n};\n\n/**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.gte = LongPrototype.greaterThanOrEqual;\n\n/**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.ge = LongPrototype.greaterThanOrEqual;\n\n/**\n * Compares this Long's value with the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\nLongPrototype.compare = function compare(other) {\n if (!isLong(other))\n other = fromValue(other);\n if (this.eq(other))\n return 0;\n var thisNeg = this.isNegative(),\n otherNeg = other.isNegative();\n if (thisNeg && !otherNeg)\n return -1;\n if (!thisNeg && otherNeg)\n return 1;\n // At this point the sign bits are the same\n if (!this.unsigned)\n return this.sub(other).isNegative() ? -1 : 1;\n // Both are positive if at least one is unsigned\n return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1;\n};\n\n/**\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\nLongPrototype.comp = LongPrototype.compare;\n\n/**\n * Negates this Long's value.\n * @this {!Long}\n * @returns {!Long} Negated Long\n */\nLongPrototype.negate = function negate() {\n if (!this.unsigned && this.eq(MIN_VALUE))\n return MIN_VALUE;\n return this.not().add(ONE);\n};\n\n/**\n * Negates this Long's value. This is an alias of {@link Long#negate}.\n * @function\n * @returns {!Long} Negated Long\n */\nLongPrototype.neg = LongPrototype.negate;\n\n/**\n * Returns the sum of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} addend Addend\n * @returns {!Long} Sum\n */\nLongPrototype.add = function add(addend) {\n if (!isLong(addend))\n addend = fromValue(addend);\n\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\n\n var a48 = this.high >>> 16;\n var a32 = this.high & 0xFFFF;\n var a16 = this.low >>> 16;\n var a00 = this.low & 0xFFFF;\n\n var b48 = addend.high >>> 16;\n var b32 = addend.high & 0xFFFF;\n var b16 = addend.low >>> 16;\n var b00 = addend.low & 0xFFFF;\n\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 + b00;\n c16 += c00 >>> 16;\n c00 &= 0xFFFF;\n c16 += a16 + b16;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c32 += a32 + b32;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c48 += a48 + b48;\n c48 &= 0xFFFF;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\n};\n\n/**\n * Returns the difference of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\nLongPrototype.subtract = function subtract(subtrahend) {\n if (!isLong(subtrahend))\n subtrahend = fromValue(subtrahend);\n return this.add(subtrahend.neg());\n};\n\n/**\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\n * @function\n * @param {!Long|number|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\nLongPrototype.sub = LongPrototype.subtract;\n\n/**\n * Returns the product of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} multiplier Multiplier\n * @returns {!Long} Product\n */\nLongPrototype.multiply = function multiply(multiplier) {\n if (this.isZero())\n return this;\n if (!isLong(multiplier))\n multiplier = fromValue(multiplier);\n\n // use wasm support if present\n if (wasm) {\n var low = wasm[\"mul\"](this.low,\n this.high,\n multiplier.low,\n multiplier.high);\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n\n if (multiplier.isZero())\n return this.unsigned ? UZERO : ZERO;\n if (this.eq(MIN_VALUE))\n return multiplier.isOdd() ? MIN_VALUE : ZERO;\n if (multiplier.eq(MIN_VALUE))\n return this.isOdd() ? MIN_VALUE : ZERO;\n\n if (this.isNegative()) {\n if (multiplier.isNegative())\n return this.neg().mul(multiplier.neg());\n else\n return this.neg().mul(multiplier).neg();\n } else if (multiplier.isNegative())\n return this.mul(multiplier.neg()).neg();\n\n // If both longs are small, use float multiplication\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\n return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\n\n // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\n // We can skip products that would overflow.\n\n var a48 = this.high >>> 16;\n var a32 = this.high & 0xFFFF;\n var a16 = this.low >>> 16;\n var a00 = this.low & 0xFFFF;\n\n var b48 = multiplier.high >>> 16;\n var b32 = multiplier.high & 0xFFFF;\n var b16 = multiplier.low >>> 16;\n var b00 = multiplier.low & 0xFFFF;\n\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 * b00;\n c16 += c00 >>> 16;\n c00 &= 0xFFFF;\n c16 += a16 * b00;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c16 += a00 * b16;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c32 += a32 * b00;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c32 += a16 * b16;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c32 += a00 * b32;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\n c48 &= 0xFFFF;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\n};\n\n/**\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\n * @function\n * @param {!Long|number|string} multiplier Multiplier\n * @returns {!Long} Product\n */\nLongPrototype.mul = LongPrototype.multiply;\n\n/**\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\n * unsigned if this Long is unsigned.\n * @this {!Long}\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Quotient\n */\nLongPrototype.divide = function divide(divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n if (divisor.isZero())\n throw Error('division by zero');\n\n // use wasm support if present\n if (wasm) {\n // guard against signed division overflow: the largest\n // negative number / -1 would be 1 larger than the largest\n // positive number, due to two's complement.\n if (!this.unsigned &&\n this.high === -0x80000000 &&\n divisor.low === -1 && divisor.high === -1) {\n // be consistent with non-wasm code path\n return this;\n }\n var low = (this.unsigned ? wasm[\"div_u\"] : wasm[\"div_s\"])(\n this.low,\n this.high,\n divisor.low,\n divisor.high\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n\n if (this.isZero())\n return this.unsigned ? UZERO : ZERO;\n var approx, rem, res;\n if (!this.unsigned) {\n // This section is only relevant for signed longs and is derived from the\n // closure library as a whole.\n if (this.eq(MIN_VALUE)) {\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\n return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE\n else if (divisor.eq(MIN_VALUE))\n return ONE;\n else {\n // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\n var halfThis = this.shr(1);\n approx = halfThis.div(divisor).shl(1);\n if (approx.eq(ZERO)) {\n return divisor.isNegative() ? ONE : NEG_ONE;\n } else {\n rem = this.sub(divisor.mul(approx));\n res = approx.add(rem.div(divisor));\n return res;\n }\n }\n } else if (divisor.eq(MIN_VALUE))\n return this.unsigned ? UZERO : ZERO;\n if (this.isNegative()) {\n if (divisor.isNegative())\n return this.neg().div(divisor.neg());\n return this.neg().div(divisor).neg();\n } else if (divisor.isNegative())\n return this.div(divisor.neg()).neg();\n res = ZERO;\n } else {\n // The algorithm below has not been made for unsigned longs. It's therefore\n // required to take special care of the MSB prior to running it.\n if (!divisor.unsigned)\n divisor = divisor.toUnsigned();\n if (divisor.gt(this))\n return UZERO;\n if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true\n return UONE;\n res = UZERO;\n }\n\n // Repeat the following until the remainder is less than other: find a\n // floating-point that approximates remainder / other *from below*, add this\n // into the result, and subtract it from the remainder. It is critical that\n // the approximate value is less than or equal to the real value so that the\n // remainder never becomes negative.\n rem = this;\n while (rem.gte(divisor)) {\n // Approximate the result of division. This may be a little greater or\n // smaller than the actual value.\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\n\n // We will tweak the approximate result by changing it in the 48-th digit or\n // the smallest non-fractional digit, whichever is larger.\n var log2 = Math.ceil(Math.log(approx) / Math.LN2),\n delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48),\n\n // Decrease the approximation until it is smaller than the remainder. Note\n // that if it is too large, the product overflows and is negative.\n approxRes = fromNumber(approx),\n approxRem = approxRes.mul(divisor);\n while (approxRem.isNegative() || approxRem.gt(rem)) {\n approx -= delta;\n approxRes = fromNumber(approx, this.unsigned);\n approxRem = approxRes.mul(divisor);\n }\n\n // We know the answer can't be zero... and actually, zero would cause\n // infinite recursion since we would make no progress.\n if (approxRes.isZero())\n approxRes = ONE;\n\n res = res.add(approxRes);\n rem = rem.sub(approxRem);\n }\n return res;\n};\n\n/**\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Quotient\n */\nLongPrototype.div = LongPrototype.divide;\n\n/**\n * Returns this Long modulo the specified.\n * @this {!Long}\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\nLongPrototype.modulo = function modulo(divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n\n // use wasm support if present\n if (wasm) {\n var low = (this.unsigned ? wasm[\"rem_u\"] : wasm[\"rem_s\"])(\n this.low,\n this.high,\n divisor.low,\n divisor.high\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n\n return this.sub(this.div(divisor).mul(divisor));\n};\n\n/**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\nLongPrototype.mod = LongPrototype.modulo;\n\n/**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\nLongPrototype.rem = LongPrototype.modulo;\n\n/**\n * Returns the bitwise NOT of this Long.\n * @this {!Long}\n * @returns {!Long}\n */\nLongPrototype.not = function not() {\n return fromBits(~this.low, ~this.high, this.unsigned);\n};\n\n/**\n * Returns count leading zeros of this Long.\n * @this {!Long}\n * @returns {!number}\n */\nLongPrototype.countLeadingZeros = function countLeadingZeros() {\n return this.high ? Math.clz32(this.high) : Math.clz32(this.low) + 32;\n};\n\n/**\n * Returns count leading zeros. This is an alias of {@link Long#countLeadingZeros}.\n * @function\n * @param {!Long}\n * @returns {!number}\n */\nLongPrototype.clz = LongPrototype.countLeadingZeros;\n\n/**\n * Returns count trailing zeros of this Long.\n * @this {!Long}\n * @returns {!number}\n */\nLongPrototype.countTrailingZeros = function countTrailingZeros() {\n return this.low ? ctz32(this.low) : ctz32(this.high) + 32;\n};\n\n/**\n * Returns count trailing zeros. This is an alias of {@link Long#countTrailingZeros}.\n * @function\n * @param {!Long}\n * @returns {!number}\n */\nLongPrototype.ctz = LongPrototype.countTrailingZeros;\n\n/**\n * Returns the bitwise AND of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nLongPrototype.and = function and(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\n};\n\n/**\n * Returns the bitwise OR of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nLongPrototype.or = function or(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\n};\n\n/**\n * Returns the bitwise XOR of this Long and the given one.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nLongPrototype.xor = function xor(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\n};\n\n/**\n * Returns this Long with bits shifted to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shiftLeft = function shiftLeft(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n else if (numBits < 32)\n return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);\n else\n return fromBits(0, this.low << (numBits - 32), this.unsigned);\n};\n\n/**\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shl = LongPrototype.shiftLeft;\n\n/**\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shiftRight = function shiftRight(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n else if (numBits < 32)\n return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);\n else\n return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);\n};\n\n/**\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shr = LongPrototype.shiftRight;\n\n/**\n * Returns this Long with bits logically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits < 32) return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >>> numBits, this.unsigned);\n if (numBits === 32) return fromBits(this.high, 0, this.unsigned);\n return fromBits(this.high >>> (numBits - 32), 0, this.unsigned);\n};\n\n/**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shru = LongPrototype.shiftRightUnsigned;\n\n/**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shr_u = LongPrototype.shiftRightUnsigned;\n\n/**\n * Returns this Long with bits rotated to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotateLeft = function rotateLeft(numBits) {\n var b;\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = (32 - numBits);\n return fromBits(((this.low << numBits) | (this.high >>> b)), ((this.high << numBits) | (this.low >>> b)), this.unsigned);\n }\n numBits -= 32;\n b = (32 - numBits);\n return fromBits(((this.high << numBits) | (this.low >>> b)), ((this.low << numBits) | (this.high >>> b)), this.unsigned);\n}\n/**\n * Returns this Long with bits rotated to the left by the given amount. This is an alias of {@link Long#rotateLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotl = LongPrototype.rotateLeft;\n\n/**\n * Returns this Long with bits rotated to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotateRight = function rotateRight(numBits) {\n var b;\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = (32 - numBits);\n return fromBits(((this.high << b) | (this.low >>> numBits)), ((this.low << b) | (this.high >>> numBits)), this.unsigned);\n }\n numBits -= 32;\n b = (32 - numBits);\n return fromBits(((this.low << b) | (this.high >>> numBits)), ((this.high << b) | (this.low >>> numBits)), this.unsigned);\n}\n/**\n * Returns this Long with bits rotated to the right by the given amount. This is an alias of {@link Long#rotateRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotr = LongPrototype.rotateRight;\n\n/**\n * Converts this Long to signed.\n * @this {!Long}\n * @returns {!Long} Signed long\n */\nLongPrototype.toSigned = function toSigned() {\n if (!this.unsigned)\n return this;\n return fromBits(this.low, this.high, false);\n};\n\n/**\n * Converts this Long to unsigned.\n * @this {!Long}\n * @returns {!Long} Unsigned long\n */\nLongPrototype.toUnsigned = function toUnsigned() {\n if (this.unsigned)\n return this;\n return fromBits(this.low, this.high, true);\n};\n\n/**\n * Converts this Long to its byte representation.\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @this {!Long}\n * @returns {!Array.} Byte representation\n */\nLongPrototype.toBytes = function toBytes(le) {\n return le ? this.toBytesLE() : this.toBytesBE();\n};\n\n/**\n * Converts this Long to its little endian byte representation.\n * @this {!Long}\n * @returns {!Array.} Little endian byte representation\n */\nLongPrototype.toBytesLE = function toBytesLE() {\n var hi = this.high,\n lo = this.low;\n return [\n lo & 0xff,\n lo >>> 8 & 0xff,\n lo >>> 16 & 0xff,\n lo >>> 24,\n hi & 0xff,\n hi >>> 8 & 0xff,\n hi >>> 16 & 0xff,\n hi >>> 24\n ];\n};\n\n/**\n * Converts this Long to its big endian byte representation.\n * @this {!Long}\n * @returns {!Array.} Big endian byte representation\n */\nLongPrototype.toBytesBE = function toBytesBE() {\n var hi = this.high,\n lo = this.low;\n return [\n hi >>> 24,\n hi >>> 16 & 0xff,\n hi >>> 8 & 0xff,\n hi & 0xff,\n lo >>> 24,\n lo >>> 16 & 0xff,\n lo >>> 8 & 0xff,\n lo & 0xff\n ];\n};\n\n/**\n * Creates a Long from its byte representation.\n * @param {!Array.} bytes Byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @returns {Long} The corresponding Long value\n */\nLong.fromBytes = function fromBytes(bytes, unsigned, le) {\n return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);\n};\n\n/**\n * Creates a Long from its little endian byte representation.\n * @param {!Array.} bytes Little endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\nLong.fromBytesLE = function fromBytesLE(bytes, unsigned) {\n return new Long(\n bytes[0] |\n bytes[1] << 8 |\n bytes[2] << 16 |\n bytes[3] << 24,\n bytes[4] |\n bytes[5] << 8 |\n bytes[6] << 16 |\n bytes[7] << 24,\n unsigned\n );\n};\n\n/**\n * Creates a Long from its big endian byte representation.\n * @param {!Array.} bytes Big endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\nLong.fromBytesBE = function fromBytesBE(bytes, unsigned) {\n return new Long(\n bytes[4] << 24 |\n bytes[5] << 16 |\n bytes[6] << 8 |\n bytes[7],\n bytes[0] << 24 |\n bytes[1] << 16 |\n bytes[2] << 8 |\n bytes[3],\n unsigned\n );\n};\n\nexport default Long;\n", "/* eslint-disable */\nimport Long from \"long\";\nimport _m0 from \"protobufjs/minimal\";\nimport { Color3 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBAvatarShape() {\n return {\n id: \"\",\n name: undefined,\n bodyShape: undefined,\n skinColor: undefined,\n hairColor: undefined,\n eyeColor: undefined,\n expressionTriggerId: undefined,\n expressionTriggerTimestamp: undefined,\n talking: undefined,\n wearables: [],\n emotes: [],\n };\n}\n/**\n * @public\n */\nexport var PBAvatarShape;\n(function (PBAvatarShape) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.id !== \"\") {\n writer.uint32(10).string(message.id);\n }\n if (message.name !== undefined) {\n writer.uint32(18).string(message.name);\n }\n if (message.bodyShape !== undefined) {\n writer.uint32(26).string(message.bodyShape);\n }\n if (message.skinColor !== undefined) {\n Color3.encode(message.skinColor, writer.uint32(34).fork()).ldelim();\n }\n if (message.hairColor !== undefined) {\n Color3.encode(message.hairColor, writer.uint32(42).fork()).ldelim();\n }\n if (message.eyeColor !== undefined) {\n Color3.encode(message.eyeColor, writer.uint32(50).fork()).ldelim();\n }\n if (message.expressionTriggerId !== undefined) {\n writer.uint32(58).string(message.expressionTriggerId);\n }\n if (message.expressionTriggerTimestamp !== undefined) {\n writer.uint32(64).int64(message.expressionTriggerTimestamp);\n }\n if (message.talking !== undefined) {\n writer.uint32(72).bool(message.talking);\n }\n for (const v of message.wearables) {\n writer.uint32(82).string(v);\n }\n for (const v of message.emotes) {\n writer.uint32(90).string(v);\n }\n return writer;\n }\n PBAvatarShape.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAvatarShape();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.id = reader.string();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.name = reader.string();\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.bodyShape = reader.string();\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.skinColor = Color3.decode(reader, reader.uint32());\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.hairColor = Color3.decode(reader, reader.uint32());\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.eyeColor = Color3.decode(reader, reader.uint32());\n continue;\n case 7:\n if (tag !== 58) {\n break;\n }\n message.expressionTriggerId = reader.string();\n continue;\n case 8:\n if (tag !== 64) {\n break;\n }\n message.expressionTriggerTimestamp = longToNumber(reader.int64());\n continue;\n case 9:\n if (tag !== 72) {\n break;\n }\n message.talking = reader.bool();\n continue;\n case 10:\n if (tag !== 82) {\n break;\n }\n message.wearables.push(reader.string());\n continue;\n case 11:\n if (tag !== 90) {\n break;\n }\n message.emotes.push(reader.string());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAvatarShape.decode = decode;\n})(PBAvatarShape || (PBAvatarShape = {}));\nconst tsProtoGlobalThis = (() => {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw \"Unable to locate global object\";\n})();\nfunction longToNumber(long) {\n if (long.gt(Number.MAX_SAFE_INTEGER)) {\n throw new tsProtoGlobalThis.Error(\"Value is larger than Number.MAX_SAFE_INTEGER\");\n }\n return long.toNumber();\n}\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long;\n _m0.configure();\n}\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.common\";\nfunction createBaseColor3() {\n return { r: 0, g: 0, b: 0 };\n}\n/**\n * @public\n */\nexport var Color3;\n(function (Color3) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.r !== 0) {\n writer.uint32(13).float(message.r);\n }\n if (message.g !== 0) {\n writer.uint32(21).float(message.g);\n }\n if (message.b !== 0) {\n writer.uint32(29).float(message.b);\n }\n return writer;\n }\n Color3.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseColor3();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.r = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.g = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.b = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Color3.decode = decode;\n})(Color3 || (Color3 = {}));\nfunction createBaseColor4() {\n return { r: 0, g: 0, b: 0, a: 0 };\n}\n/**\n * @public\n */\nexport var Color4;\n(function (Color4) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.r !== 0) {\n writer.uint32(13).float(message.r);\n }\n if (message.g !== 0) {\n writer.uint32(21).float(message.g);\n }\n if (message.b !== 0) {\n writer.uint32(29).float(message.b);\n }\n if (message.a !== 0) {\n writer.uint32(37).float(message.a);\n }\n return writer;\n }\n Color4.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseColor4();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.r = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.g = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.b = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.a = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Color4.decode = decode;\n})(Color4 || (Color4 = {}));\n", "import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';\n/**\n * @internal\n */\nexport const AvatarShapeSchema = {\n COMPONENT_ID: 1080,\n serialize(value, builder) {\n const writer = PBAvatarShape.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAvatarShape.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAvatarShape.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAvatarShape\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form.\n * Only the values below and the (BM_X | BM_Y) combination are valid.\n */\n/**\n * @public\n */\nexport var BillboardMode;\n(function (BillboardMode) {\n BillboardMode[BillboardMode[\"BM_NONE\"] = 0] = \"BM_NONE\";\n BillboardMode[BillboardMode[\"BM_X\"] = 1] = \"BM_X\";\n BillboardMode[BillboardMode[\"BM_Y\"] = 2] = \"BM_Y\";\n BillboardMode[BillboardMode[\"BM_Z\"] = 4] = \"BM_Z\";\n /** BM_ALL - bitwise combination BM_X | BM_Y | BM_Z */\n BillboardMode[BillboardMode[\"BM_ALL\"] = 7] = \"BM_ALL\";\n})(BillboardMode || (BillboardMode = {}));\nfunction createBasePBBillboard() {\n return { billboardMode: undefined };\n}\n/**\n * @public\n */\nexport var PBBillboard;\n(function (PBBillboard) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.billboardMode !== undefined) {\n writer.uint32(8).int32(message.billboardMode);\n }\n return writer;\n }\n PBBillboard.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBBillboard();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.billboardMode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBBillboard.decode = decode;\n})(PBBillboard || (PBBillboard = {}));\n", "import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';\n/**\n * @internal\n */\nexport const BillboardSchema = {\n COMPONENT_ID: 1090,\n serialize(value, builder) {\n const writer = PBBillboard.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBBillboard.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBBillboard.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBBillboard\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBCameraMode() {\n return { mode: 0 };\n}\n/**\n * @public\n */\nexport var PBCameraMode;\n(function (PBCameraMode) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.mode !== 0) {\n writer.uint32(8).int32(message.mode);\n }\n return writer;\n }\n PBCameraMode.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBCameraMode();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.mode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBCameraMode.decode = decode;\n})(PBCameraMode || (PBCameraMode = {}));\n", "import { PBCameraMode } from './pb/decentraland/sdk/components/camera_mode.gen';\n/**\n * @internal\n */\nexport const CameraModeSchema = {\n COMPONENT_ID: 1072,\n serialize(value, builder) {\n const writer = PBCameraMode.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBCameraMode.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBCameraMode.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBCameraMode\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Vector3 } from \"../../common/vectors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBCameraModeArea() {\n return { area: undefined, mode: 0 };\n}\n/**\n * @public\n */\nexport var PBCameraModeArea;\n(function (PBCameraModeArea) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.area !== undefined) {\n Vector3.encode(message.area, writer.uint32(10).fork()).ldelim();\n }\n if (message.mode !== 0) {\n writer.uint32(16).int32(message.mode);\n }\n return writer;\n }\n PBCameraModeArea.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBCameraModeArea();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.area = Vector3.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.mode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBCameraModeArea.decode = decode;\n})(PBCameraModeArea || (PBCameraModeArea = {}));\n", "import { PBCameraModeArea } from './pb/decentraland/sdk/components/camera_mode_area.gen';\n/**\n * @internal\n */\nexport const CameraModeAreaSchema = {\n COMPONENT_ID: 1071,\n serialize(value, builder) {\n const writer = PBCameraModeArea.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBCameraModeArea.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBCameraModeArea.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBCameraModeArea\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBEngineInfo() {\n return { frameNumber: 0, totalRuntime: 0, tickNumber: 0 };\n}\n/**\n * @public\n */\nexport var PBEngineInfo;\n(function (PBEngineInfo) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.frameNumber !== 0) {\n writer.uint32(8).uint32(message.frameNumber);\n }\n if (message.totalRuntime !== 0) {\n writer.uint32(21).float(message.totalRuntime);\n }\n if (message.tickNumber !== 0) {\n writer.uint32(24).uint32(message.tickNumber);\n }\n return writer;\n }\n PBEngineInfo.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBEngineInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.frameNumber = reader.uint32();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.totalRuntime = reader.float();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.tickNumber = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBEngineInfo.decode = decode;\n})(PBEngineInfo || (PBEngineInfo = {}));\n", "import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';\n/**\n * @internal\n */\nexport const EngineInfoSchema = {\n COMPONENT_ID: 1048,\n serialize(value, builder) {\n const writer = PBEngineInfo.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBEngineInfo.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBEngineInfo.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBEngineInfo\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBGltfContainer() {\n return { src: \"\", visibleMeshesCollisionMask: undefined, invisibleMeshesCollisionMask: undefined };\n}\n/**\n * @public\n */\nexport var PBGltfContainer;\n(function (PBGltfContainer) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.src !== \"\") {\n writer.uint32(10).string(message.src);\n }\n if (message.visibleMeshesCollisionMask !== undefined) {\n writer.uint32(32).uint32(message.visibleMeshesCollisionMask);\n }\n if (message.invisibleMeshesCollisionMask !== undefined) {\n writer.uint32(40).uint32(message.invisibleMeshesCollisionMask);\n }\n return writer;\n }\n PBGltfContainer.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBGltfContainer();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.src = reader.string();\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.visibleMeshesCollisionMask = reader.uint32();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.invisibleMeshesCollisionMask = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBGltfContainer.decode = decode;\n})(PBGltfContainer || (PBGltfContainer = {}));\n", "import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';\n/**\n * @internal\n */\nexport const GltfContainerSchema = {\n COMPONENT_ID: 1041,\n serialize(value, builder) {\n const writer = PBGltfContainer.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBGltfContainer.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBGltfContainer.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBGltfContainer\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBGltfContainerLoadingState() {\n return { currentState: 0 };\n}\n/**\n * @public\n */\nexport var PBGltfContainerLoadingState;\n(function (PBGltfContainerLoadingState) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.currentState !== 0) {\n writer.uint32(8).int32(message.currentState);\n }\n return writer;\n }\n PBGltfContainerLoadingState.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBGltfContainerLoadingState();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.currentState = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBGltfContainerLoadingState.decode = decode;\n})(PBGltfContainerLoadingState || (PBGltfContainerLoadingState = {}));\n", "import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';\n/**\n * @internal\n */\nexport const GltfContainerLoadingStateSchema = {\n COMPONENT_ID: 1049,\n serialize(value, builder) {\n const writer = PBGltfContainerLoadingState.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBGltfContainerLoadingState.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBGltfContainerLoadingState.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBGltfContainerLoadingState\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color3, Color4 } from \"../../common/colors.gen\";\nimport { TextureUnion } from \"../../common/texture.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var MaterialTransparencyMode;\n(function (MaterialTransparencyMode) {\n MaterialTransparencyMode[MaterialTransparencyMode[\"MTM_OPAQUE\"] = 0] = \"MTM_OPAQUE\";\n MaterialTransparencyMode[MaterialTransparencyMode[\"MTM_ALPHA_TEST\"] = 1] = \"MTM_ALPHA_TEST\";\n MaterialTransparencyMode[MaterialTransparencyMode[\"MTM_ALPHA_BLEND\"] = 2] = \"MTM_ALPHA_BLEND\";\n MaterialTransparencyMode[MaterialTransparencyMode[\"MTM_ALPHA_TEST_AND_ALPHA_BLEND\"] = 3] = \"MTM_ALPHA_TEST_AND_ALPHA_BLEND\";\n MaterialTransparencyMode[MaterialTransparencyMode[\"MTM_AUTO\"] = 4] = \"MTM_AUTO\";\n})(MaterialTransparencyMode || (MaterialTransparencyMode = {}));\nfunction createBasePBMaterial() {\n return { material: undefined };\n}\n/**\n * @public\n */\nexport var PBMaterial;\n(function (PBMaterial) {\n function encode(message, writer = _m0.Writer.create()) {\n switch (message.material?.$case) {\n case \"unlit\":\n PBMaterial_UnlitMaterial.encode(message.material.unlit, writer.uint32(10).fork()).ldelim();\n break;\n case \"pbr\":\n PBMaterial_PbrMaterial.encode(message.material.pbr, writer.uint32(18).fork()).ldelim();\n break;\n }\n return writer;\n }\n PBMaterial.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMaterial();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.material = { $case: \"unlit\", unlit: PBMaterial_UnlitMaterial.decode(reader, reader.uint32()) };\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.material = { $case: \"pbr\", pbr: PBMaterial_PbrMaterial.decode(reader, reader.uint32()) };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMaterial.decode = decode;\n})(PBMaterial || (PBMaterial = {}));\nfunction createBasePBMaterial_UnlitMaterial() {\n return { texture: undefined, alphaTest: undefined, castShadows: undefined, diffuseColor: undefined };\n}\n/**\n * @public\n */\nexport var PBMaterial_UnlitMaterial;\n(function (PBMaterial_UnlitMaterial) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.texture !== undefined) {\n TextureUnion.encode(message.texture, writer.uint32(10).fork()).ldelim();\n }\n if (message.alphaTest !== undefined) {\n writer.uint32(21).float(message.alphaTest);\n }\n if (message.castShadows !== undefined) {\n writer.uint32(24).bool(message.castShadows);\n }\n if (message.diffuseColor !== undefined) {\n Color4.encode(message.diffuseColor, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n }\n PBMaterial_UnlitMaterial.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMaterial_UnlitMaterial();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.texture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.alphaTest = reader.float();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.castShadows = reader.bool();\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.diffuseColor = Color4.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMaterial_UnlitMaterial.decode = decode;\n})(PBMaterial_UnlitMaterial || (PBMaterial_UnlitMaterial = {}));\nfunction createBasePBMaterial_PbrMaterial() {\n return {\n texture: undefined,\n alphaTest: undefined,\n castShadows: undefined,\n alphaTexture: undefined,\n emissiveTexture: undefined,\n bumpTexture: undefined,\n albedoColor: undefined,\n emissiveColor: undefined,\n reflectivityColor: undefined,\n transparencyMode: undefined,\n metallic: undefined,\n roughness: undefined,\n specularIntensity: undefined,\n emissiveIntensity: undefined,\n directIntensity: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBMaterial_PbrMaterial;\n(function (PBMaterial_PbrMaterial) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.texture !== undefined) {\n TextureUnion.encode(message.texture, writer.uint32(10).fork()).ldelim();\n }\n if (message.alphaTest !== undefined) {\n writer.uint32(21).float(message.alphaTest);\n }\n if (message.castShadows !== undefined) {\n writer.uint32(24).bool(message.castShadows);\n }\n if (message.alphaTexture !== undefined) {\n TextureUnion.encode(message.alphaTexture, writer.uint32(34).fork()).ldelim();\n }\n if (message.emissiveTexture !== undefined) {\n TextureUnion.encode(message.emissiveTexture, writer.uint32(42).fork()).ldelim();\n }\n if (message.bumpTexture !== undefined) {\n TextureUnion.encode(message.bumpTexture, writer.uint32(50).fork()).ldelim();\n }\n if (message.albedoColor !== undefined) {\n Color4.encode(message.albedoColor, writer.uint32(58).fork()).ldelim();\n }\n if (message.emissiveColor !== undefined) {\n Color3.encode(message.emissiveColor, writer.uint32(66).fork()).ldelim();\n }\n if (message.reflectivityColor !== undefined) {\n Color3.encode(message.reflectivityColor, writer.uint32(74).fork()).ldelim();\n }\n if (message.transparencyMode !== undefined) {\n writer.uint32(80).int32(message.transparencyMode);\n }\n if (message.metallic !== undefined) {\n writer.uint32(93).float(message.metallic);\n }\n if (message.roughness !== undefined) {\n writer.uint32(101).float(message.roughness);\n }\n if (message.specularIntensity !== undefined) {\n writer.uint32(117).float(message.specularIntensity);\n }\n if (message.emissiveIntensity !== undefined) {\n writer.uint32(125).float(message.emissiveIntensity);\n }\n if (message.directIntensity !== undefined) {\n writer.uint32(133).float(message.directIntensity);\n }\n return writer;\n }\n PBMaterial_PbrMaterial.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMaterial_PbrMaterial();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.texture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.alphaTest = reader.float();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.castShadows = reader.bool();\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.alphaTexture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.emissiveTexture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.bumpTexture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 7:\n if (tag !== 58) {\n break;\n }\n message.albedoColor = Color4.decode(reader, reader.uint32());\n continue;\n case 8:\n if (tag !== 66) {\n break;\n }\n message.emissiveColor = Color3.decode(reader, reader.uint32());\n continue;\n case 9:\n if (tag !== 74) {\n break;\n }\n message.reflectivityColor = Color3.decode(reader, reader.uint32());\n continue;\n case 10:\n if (tag !== 80) {\n break;\n }\n message.transparencyMode = reader.int32();\n continue;\n case 11:\n if (tag !== 93) {\n break;\n }\n message.metallic = reader.float();\n continue;\n case 12:\n if (tag !== 101) {\n break;\n }\n message.roughness = reader.float();\n continue;\n case 14:\n if (tag !== 117) {\n break;\n }\n message.specularIntensity = reader.float();\n continue;\n case 15:\n if (tag !== 125) {\n break;\n }\n message.emissiveIntensity = reader.float();\n continue;\n case 16:\n if (tag !== 133) {\n break;\n }\n message.directIntensity = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMaterial_PbrMaterial.decode = decode;\n})(PBMaterial_PbrMaterial || (PBMaterial_PbrMaterial = {}));\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.common\";\n/**\n * @public\n */\nexport var TextureWrapMode;\n(function (TextureWrapMode) {\n TextureWrapMode[TextureWrapMode[\"TWM_REPEAT\"] = 0] = \"TWM_REPEAT\";\n TextureWrapMode[TextureWrapMode[\"TWM_CLAMP\"] = 1] = \"TWM_CLAMP\";\n TextureWrapMode[TextureWrapMode[\"TWM_MIRROR\"] = 2] = \"TWM_MIRROR\";\n})(TextureWrapMode || (TextureWrapMode = {}));\n/**\n * @public\n */\nexport var TextureFilterMode;\n(function (TextureFilterMode) {\n TextureFilterMode[TextureFilterMode[\"TFM_POINT\"] = 0] = \"TFM_POINT\";\n TextureFilterMode[TextureFilterMode[\"TFM_BILINEAR\"] = 1] = \"TFM_BILINEAR\";\n TextureFilterMode[TextureFilterMode[\"TFM_TRILINEAR\"] = 2] = \"TFM_TRILINEAR\";\n})(TextureFilterMode || (TextureFilterMode = {}));\nfunction createBaseTexture() {\n return { src: \"\", wrapMode: undefined, filterMode: undefined };\n}\n/**\n * @public\n */\nexport var Texture;\n(function (Texture) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.src !== \"\") {\n writer.uint32(10).string(message.src);\n }\n if (message.wrapMode !== undefined) {\n writer.uint32(16).int32(message.wrapMode);\n }\n if (message.filterMode !== undefined) {\n writer.uint32(24).int32(message.filterMode);\n }\n return writer;\n }\n Texture.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTexture();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.src = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.wrapMode = reader.int32();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.filterMode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Texture.decode = decode;\n})(Texture || (Texture = {}));\nfunction createBaseAvatarTexture() {\n return { userId: \"\", wrapMode: undefined, filterMode: undefined };\n}\n/**\n * @public\n */\nexport var AvatarTexture;\n(function (AvatarTexture) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.userId !== \"\") {\n writer.uint32(10).string(message.userId);\n }\n if (message.wrapMode !== undefined) {\n writer.uint32(16).int32(message.wrapMode);\n }\n if (message.filterMode !== undefined) {\n writer.uint32(24).int32(message.filterMode);\n }\n return writer;\n }\n AvatarTexture.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseAvatarTexture();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.userId = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.wrapMode = reader.int32();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.filterMode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n AvatarTexture.decode = decode;\n})(AvatarTexture || (AvatarTexture = {}));\nfunction createBaseVideoTexture() {\n return { videoPlayerEntity: 0, wrapMode: undefined, filterMode: undefined };\n}\n/**\n * @public\n */\nexport var VideoTexture;\n(function (VideoTexture) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.videoPlayerEntity !== 0) {\n writer.uint32(8).uint32(message.videoPlayerEntity);\n }\n if (message.wrapMode !== undefined) {\n writer.uint32(16).int32(message.wrapMode);\n }\n if (message.filterMode !== undefined) {\n writer.uint32(24).int32(message.filterMode);\n }\n return writer;\n }\n VideoTexture.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVideoTexture();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.videoPlayerEntity = reader.uint32();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.wrapMode = reader.int32();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.filterMode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n VideoTexture.decode = decode;\n})(VideoTexture || (VideoTexture = {}));\nfunction createBaseTextureUnion() {\n return { tex: undefined };\n}\n/**\n * @public\n */\nexport var TextureUnion;\n(function (TextureUnion) {\n function encode(message, writer = _m0.Writer.create()) {\n switch (message.tex?.$case) {\n case \"texture\":\n Texture.encode(message.tex.texture, writer.uint32(10).fork()).ldelim();\n break;\n case \"avatarTexture\":\n AvatarTexture.encode(message.tex.avatarTexture, writer.uint32(18).fork()).ldelim();\n break;\n case \"videoTexture\":\n VideoTexture.encode(message.tex.videoTexture, writer.uint32(26).fork()).ldelim();\n break;\n }\n return writer;\n }\n TextureUnion.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTextureUnion();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.tex = { $case: \"texture\", texture: Texture.decode(reader, reader.uint32()) };\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.tex = { $case: \"avatarTexture\", avatarTexture: AvatarTexture.decode(reader, reader.uint32()) };\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.tex = { $case: \"videoTexture\", videoTexture: VideoTexture.decode(reader, reader.uint32()) };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n TextureUnion.decode = decode;\n})(TextureUnion || (TextureUnion = {}));\n", "import { PBMaterial } from './pb/decentraland/sdk/components/material.gen';\n/**\n * @internal\n */\nexport const MaterialSchema = {\n COMPONENT_ID: 1017,\n serialize(value, builder) {\n const writer = PBMaterial.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBMaterial.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBMaterial.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBMaterial\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/** ColliderLayer determines the kind of collision to detect, in OR-able bit flag form. */\n/**\n * @public\n */\nexport var ColliderLayer;\n(function (ColliderLayer) {\n /** CL_NONE - no collisions */\n ColliderLayer[ColliderLayer[\"CL_NONE\"] = 0] = \"CL_NONE\";\n /** CL_POINTER - collisions with the player's pointer ray (e.g. mouse cursor hovering) */\n ColliderLayer[ColliderLayer[\"CL_POINTER\"] = 1] = \"CL_POINTER\";\n /** CL_PHYSICS - collision affecting your player's physics i.e. walls, floor, moving platfroms */\n ColliderLayer[ColliderLayer[\"CL_PHYSICS\"] = 2] = \"CL_PHYSICS\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED1\"] = 4] = \"CL_RESERVED1\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED2\"] = 8] = \"CL_RESERVED2\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED3\"] = 16] = \"CL_RESERVED3\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED4\"] = 32] = \"CL_RESERVED4\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED5\"] = 64] = \"CL_RESERVED5\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED6\"] = 128] = \"CL_RESERVED6\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM1\"] = 256] = \"CL_CUSTOM1\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM2\"] = 512] = \"CL_CUSTOM2\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM3\"] = 1024] = \"CL_CUSTOM3\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM4\"] = 2048] = \"CL_CUSTOM4\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM5\"] = 4096] = \"CL_CUSTOM5\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM6\"] = 8192] = \"CL_CUSTOM6\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM7\"] = 16384] = \"CL_CUSTOM7\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM8\"] = 32768] = \"CL_CUSTOM8\";\n})(ColliderLayer || (ColliderLayer = {}));\nfunction createBasePBMeshCollider() {\n return { collisionMask: undefined, mesh: undefined };\n}\n/**\n * @public\n */\nexport var PBMeshCollider;\n(function (PBMeshCollider) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.collisionMask !== undefined) {\n writer.uint32(8).uint32(message.collisionMask);\n }\n switch (message.mesh?.$case) {\n case \"box\":\n PBMeshCollider_BoxMesh.encode(message.mesh.box, writer.uint32(18).fork()).ldelim();\n break;\n case \"sphere\":\n PBMeshCollider_SphereMesh.encode(message.mesh.sphere, writer.uint32(26).fork()).ldelim();\n break;\n case \"cylinder\":\n PBMeshCollider_CylinderMesh.encode(message.mesh.cylinder, writer.uint32(34).fork()).ldelim();\n break;\n case \"plane\":\n PBMeshCollider_PlaneMesh.encode(message.mesh.plane, writer.uint32(42).fork()).ldelim();\n break;\n }\n return writer;\n }\n PBMeshCollider.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshCollider();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.collisionMask = reader.uint32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.mesh = { $case: \"box\", box: PBMeshCollider_BoxMesh.decode(reader, reader.uint32()) };\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.mesh = { $case: \"sphere\", sphere: PBMeshCollider_SphereMesh.decode(reader, reader.uint32()) };\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.mesh = { $case: \"cylinder\", cylinder: PBMeshCollider_CylinderMesh.decode(reader, reader.uint32()) };\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.mesh = { $case: \"plane\", plane: PBMeshCollider_PlaneMesh.decode(reader, reader.uint32()) };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshCollider.decode = decode;\n})(PBMeshCollider || (PBMeshCollider = {}));\nfunction createBasePBMeshCollider_BoxMesh() {\n return {};\n}\n/**\n * @public\n */\nexport var PBMeshCollider_BoxMesh;\n(function (PBMeshCollider_BoxMesh) {\n function encode(_, writer = _m0.Writer.create()) {\n return writer;\n }\n PBMeshCollider_BoxMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshCollider_BoxMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshCollider_BoxMesh.decode = decode;\n})(PBMeshCollider_BoxMesh || (PBMeshCollider_BoxMesh = {}));\nfunction createBasePBMeshCollider_CylinderMesh() {\n return { radiusTop: undefined, radiusBottom: undefined };\n}\n/**\n * @public\n */\nexport var PBMeshCollider_CylinderMesh;\n(function (PBMeshCollider_CylinderMesh) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.radiusTop !== undefined) {\n writer.uint32(13).float(message.radiusTop);\n }\n if (message.radiusBottom !== undefined) {\n writer.uint32(21).float(message.radiusBottom);\n }\n return writer;\n }\n PBMeshCollider_CylinderMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshCollider_CylinderMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.radiusTop = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.radiusBottom = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshCollider_CylinderMesh.decode = decode;\n})(PBMeshCollider_CylinderMesh || (PBMeshCollider_CylinderMesh = {}));\nfunction createBasePBMeshCollider_PlaneMesh() {\n return {};\n}\n/**\n * @public\n */\nexport var PBMeshCollider_PlaneMesh;\n(function (PBMeshCollider_PlaneMesh) {\n function encode(_, writer = _m0.Writer.create()) {\n return writer;\n }\n PBMeshCollider_PlaneMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshCollider_PlaneMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshCollider_PlaneMesh.decode = decode;\n})(PBMeshCollider_PlaneMesh || (PBMeshCollider_PlaneMesh = {}));\nfunction createBasePBMeshCollider_SphereMesh() {\n return {};\n}\n/**\n * @public\n */\nexport var PBMeshCollider_SphereMesh;\n(function (PBMeshCollider_SphereMesh) {\n function encode(_, writer = _m0.Writer.create()) {\n return writer;\n }\n PBMeshCollider_SphereMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshCollider_SphereMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshCollider_SphereMesh.decode = decode;\n})(PBMeshCollider_SphereMesh || (PBMeshCollider_SphereMesh = {}));\n", "import { PBMeshCollider } from './pb/decentraland/sdk/components/mesh_collider.gen';\n/**\n * @internal\n */\nexport const MeshColliderSchema = {\n COMPONENT_ID: 1019,\n serialize(value, builder) {\n const writer = PBMeshCollider.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBMeshCollider.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBMeshCollider.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBMeshCollider\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBMeshRenderer() {\n return { mesh: undefined };\n}\n/**\n * @public\n */\nexport var PBMeshRenderer;\n(function (PBMeshRenderer) {\n function encode(message, writer = _m0.Writer.create()) {\n switch (message.mesh?.$case) {\n case \"box\":\n PBMeshRenderer_BoxMesh.encode(message.mesh.box, writer.uint32(10).fork()).ldelim();\n break;\n case \"sphere\":\n PBMeshRenderer_SphereMesh.encode(message.mesh.sphere, writer.uint32(18).fork()).ldelim();\n break;\n case \"cylinder\":\n PBMeshRenderer_CylinderMesh.encode(message.mesh.cylinder, writer.uint32(26).fork()).ldelim();\n break;\n case \"plane\":\n PBMeshRenderer_PlaneMesh.encode(message.mesh.plane, writer.uint32(34).fork()).ldelim();\n break;\n }\n return writer;\n }\n PBMeshRenderer.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshRenderer();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.mesh = { $case: \"box\", box: PBMeshRenderer_BoxMesh.decode(reader, reader.uint32()) };\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.mesh = { $case: \"sphere\", sphere: PBMeshRenderer_SphereMesh.decode(reader, reader.uint32()) };\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.mesh = { $case: \"cylinder\", cylinder: PBMeshRenderer_CylinderMesh.decode(reader, reader.uint32()) };\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.mesh = { $case: \"plane\", plane: PBMeshRenderer_PlaneMesh.decode(reader, reader.uint32()) };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshRenderer.decode = decode;\n})(PBMeshRenderer || (PBMeshRenderer = {}));\nfunction createBasePBMeshRenderer_BoxMesh() {\n return { uvs: [] };\n}\n/**\n * @public\n */\nexport var PBMeshRenderer_BoxMesh;\n(function (PBMeshRenderer_BoxMesh) {\n function encode(message, writer = _m0.Writer.create()) {\n writer.uint32(10).fork();\n for (const v of message.uvs) {\n writer.float(v);\n }\n writer.ldelim();\n return writer;\n }\n PBMeshRenderer_BoxMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshRenderer_BoxMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag === 13) {\n message.uvs.push(reader.float());\n continue;\n }\n if (tag === 10) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.uvs.push(reader.float());\n }\n continue;\n }\n break;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshRenderer_BoxMesh.decode = decode;\n})(PBMeshRenderer_BoxMesh || (PBMeshRenderer_BoxMesh = {}));\nfunction createBasePBMeshRenderer_CylinderMesh() {\n return { radiusTop: undefined, radiusBottom: undefined };\n}\n/**\n * @public\n */\nexport var PBMeshRenderer_CylinderMesh;\n(function (PBMeshRenderer_CylinderMesh) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.radiusTop !== undefined) {\n writer.uint32(13).float(message.radiusTop);\n }\n if (message.radiusBottom !== undefined) {\n writer.uint32(21).float(message.radiusBottom);\n }\n return writer;\n }\n PBMeshRenderer_CylinderMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshRenderer_CylinderMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.radiusTop = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.radiusBottom = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshRenderer_CylinderMesh.decode = decode;\n})(PBMeshRenderer_CylinderMesh || (PBMeshRenderer_CylinderMesh = {}));\nfunction createBasePBMeshRenderer_PlaneMesh() {\n return { uvs: [] };\n}\n/**\n * @public\n */\nexport var PBMeshRenderer_PlaneMesh;\n(function (PBMeshRenderer_PlaneMesh) {\n function encode(message, writer = _m0.Writer.create()) {\n writer.uint32(10).fork();\n for (const v of message.uvs) {\n writer.float(v);\n }\n writer.ldelim();\n return writer;\n }\n PBMeshRenderer_PlaneMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshRenderer_PlaneMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag === 13) {\n message.uvs.push(reader.float());\n continue;\n }\n if (tag === 10) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.uvs.push(reader.float());\n }\n continue;\n }\n break;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshRenderer_PlaneMesh.decode = decode;\n})(PBMeshRenderer_PlaneMesh || (PBMeshRenderer_PlaneMesh = {}));\nfunction createBasePBMeshRenderer_SphereMesh() {\n return {};\n}\n/**\n * @public\n */\nexport var PBMeshRenderer_SphereMesh;\n(function (PBMeshRenderer_SphereMesh) {\n function encode(_, writer = _m0.Writer.create()) {\n return writer;\n }\n PBMeshRenderer_SphereMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshRenderer_SphereMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshRenderer_SphereMesh.decode = decode;\n})(PBMeshRenderer_SphereMesh || (PBMeshRenderer_SphereMesh = {}));\n", "import { PBMeshRenderer } from './pb/decentraland/sdk/components/mesh_renderer.gen';\n/**\n * @internal\n */\nexport const MeshRendererSchema = {\n COMPONENT_ID: 1018,\n serialize(value, builder) {\n const writer = PBMeshRenderer.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBMeshRenderer.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBMeshRenderer.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBMeshRenderer\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color3 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/** NftFrameType is a predefined framing style for the image. */\n/**\n * @public\n */\nexport var NftFrameType;\n(function (NftFrameType) {\n NftFrameType[NftFrameType[\"NFT_CLASSIC\"] = 0] = \"NFT_CLASSIC\";\n NftFrameType[NftFrameType[\"NFT_BAROQUE_ORNAMENT\"] = 1] = \"NFT_BAROQUE_ORNAMENT\";\n NftFrameType[NftFrameType[\"NFT_DIAMOND_ORNAMENT\"] = 2] = \"NFT_DIAMOND_ORNAMENT\";\n NftFrameType[NftFrameType[\"NFT_MINIMAL_WIDE\"] = 3] = \"NFT_MINIMAL_WIDE\";\n NftFrameType[NftFrameType[\"NFT_MINIMAL_GREY\"] = 4] = \"NFT_MINIMAL_GREY\";\n NftFrameType[NftFrameType[\"NFT_BLOCKY\"] = 5] = \"NFT_BLOCKY\";\n NftFrameType[NftFrameType[\"NFT_GOLD_EDGES\"] = 6] = \"NFT_GOLD_EDGES\";\n NftFrameType[NftFrameType[\"NFT_GOLD_CARVED\"] = 7] = \"NFT_GOLD_CARVED\";\n NftFrameType[NftFrameType[\"NFT_GOLD_WIDE\"] = 8] = \"NFT_GOLD_WIDE\";\n NftFrameType[NftFrameType[\"NFT_GOLD_ROUNDED\"] = 9] = \"NFT_GOLD_ROUNDED\";\n NftFrameType[NftFrameType[\"NFT_METAL_MEDIUM\"] = 10] = \"NFT_METAL_MEDIUM\";\n NftFrameType[NftFrameType[\"NFT_METAL_WIDE\"] = 11] = \"NFT_METAL_WIDE\";\n NftFrameType[NftFrameType[\"NFT_METAL_SLIM\"] = 12] = \"NFT_METAL_SLIM\";\n NftFrameType[NftFrameType[\"NFT_METAL_ROUNDED\"] = 13] = \"NFT_METAL_ROUNDED\";\n NftFrameType[NftFrameType[\"NFT_PINS\"] = 14] = \"NFT_PINS\";\n NftFrameType[NftFrameType[\"NFT_MINIMAL_BLACK\"] = 15] = \"NFT_MINIMAL_BLACK\";\n NftFrameType[NftFrameType[\"NFT_MINIMAL_WHITE\"] = 16] = \"NFT_MINIMAL_WHITE\";\n NftFrameType[NftFrameType[\"NFT_TAPE\"] = 17] = \"NFT_TAPE\";\n NftFrameType[NftFrameType[\"NFT_WOOD_SLIM\"] = 18] = \"NFT_WOOD_SLIM\";\n NftFrameType[NftFrameType[\"NFT_WOOD_WIDE\"] = 19] = \"NFT_WOOD_WIDE\";\n NftFrameType[NftFrameType[\"NFT_WOOD_TWIGS\"] = 20] = \"NFT_WOOD_TWIGS\";\n NftFrameType[NftFrameType[\"NFT_CANVAS\"] = 21] = \"NFT_CANVAS\";\n NftFrameType[NftFrameType[\"NFT_NONE\"] = 22] = \"NFT_NONE\";\n})(NftFrameType || (NftFrameType = {}));\nfunction createBasePBNftShape() {\n return { urn: \"\", style: undefined, color: undefined };\n}\n/**\n * @public\n */\nexport var PBNftShape;\n(function (PBNftShape) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.urn !== \"\") {\n writer.uint32(10).string(message.urn);\n }\n if (message.style !== undefined) {\n writer.uint32(16).int32(message.style);\n }\n if (message.color !== undefined) {\n Color3.encode(message.color, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n }\n PBNftShape.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBNftShape();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.urn = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.style = reader.int32();\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.color = Color3.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBNftShape.decode = decode;\n})(PBNftShape || (PBNftShape = {}));\n", "import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';\n/**\n * @internal\n */\nexport const NftShapeSchema = {\n COMPONENT_ID: 1040,\n serialize(value, builder) {\n const writer = PBNftShape.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBNftShape.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBNftShape.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBNftShape\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBPointerEvents() {\n return { pointerEvents: [] };\n}\n/**\n * @public\n */\nexport var PBPointerEvents;\n(function (PBPointerEvents) {\n function encode(message, writer = _m0.Writer.create()) {\n for (const v of message.pointerEvents) {\n PBPointerEvents_Entry.encode(v, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n }\n PBPointerEvents.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBPointerEvents();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.pointerEvents.push(PBPointerEvents_Entry.decode(reader, reader.uint32()));\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBPointerEvents.decode = decode;\n})(PBPointerEvents || (PBPointerEvents = {}));\nfunction createBasePBPointerEvents_Info() {\n return { button: undefined, hoverText: undefined, maxDistance: undefined, showFeedback: undefined };\n}\n/**\n * @public\n */\nexport var PBPointerEvents_Info;\n(function (PBPointerEvents_Info) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.button !== undefined) {\n writer.uint32(8).int32(message.button);\n }\n if (message.hoverText !== undefined) {\n writer.uint32(18).string(message.hoverText);\n }\n if (message.maxDistance !== undefined) {\n writer.uint32(29).float(message.maxDistance);\n }\n if (message.showFeedback !== undefined) {\n writer.uint32(32).bool(message.showFeedback);\n }\n return writer;\n }\n PBPointerEvents_Info.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBPointerEvents_Info();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.button = reader.int32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.hoverText = reader.string();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.maxDistance = reader.float();\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.showFeedback = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBPointerEvents_Info.decode = decode;\n})(PBPointerEvents_Info || (PBPointerEvents_Info = {}));\nfunction createBasePBPointerEvents_Entry() {\n return { eventType: 0, eventInfo: undefined };\n}\n/**\n * @public\n */\nexport var PBPointerEvents_Entry;\n(function (PBPointerEvents_Entry) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.eventType !== 0) {\n writer.uint32(8).int32(message.eventType);\n }\n if (message.eventInfo !== undefined) {\n PBPointerEvents_Info.encode(message.eventInfo, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n PBPointerEvents_Entry.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBPointerEvents_Entry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.eventType = reader.int32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.eventInfo = PBPointerEvents_Info.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBPointerEvents_Entry.decode = decode;\n})(PBPointerEvents_Entry || (PBPointerEvents_Entry = {}));\n", "import { PBPointerEvents } from './pb/decentraland/sdk/components/pointer_events.gen';\n/**\n * @internal\n */\nexport const PointerEventsSchema = {\n COMPONENT_ID: 1062,\n serialize(value, builder) {\n const writer = PBPointerEvents.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBPointerEvents.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBPointerEvents.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBPointerEvents\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { RaycastHit } from \"./common/raycast_hit.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBPointerEventsResult() {\n return { button: 0, hit: undefined, state: 0, timestamp: 0, analog: undefined, tickNumber: 0 };\n}\n/**\n * @public\n */\nexport var PBPointerEventsResult;\n(function (PBPointerEventsResult) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.button !== 0) {\n writer.uint32(8).int32(message.button);\n }\n if (message.hit !== undefined) {\n RaycastHit.encode(message.hit, writer.uint32(18).fork()).ldelim();\n }\n if (message.state !== 0) {\n writer.uint32(32).int32(message.state);\n }\n if (message.timestamp !== 0) {\n writer.uint32(40).uint32(message.timestamp);\n }\n if (message.analog !== undefined) {\n writer.uint32(53).float(message.analog);\n }\n if (message.tickNumber !== 0) {\n writer.uint32(56).uint32(message.tickNumber);\n }\n return writer;\n }\n PBPointerEventsResult.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBPointerEventsResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.button = reader.int32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.hit = RaycastHit.decode(reader, reader.uint32());\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.state = reader.int32();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.timestamp = reader.uint32();\n continue;\n case 6:\n if (tag !== 53) {\n break;\n }\n message.analog = reader.float();\n continue;\n case 7:\n if (tag !== 56) {\n break;\n }\n message.tickNumber = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBPointerEventsResult.decode = decode;\n})(PBPointerEventsResult || (PBPointerEventsResult = {}));\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Vector3 } from \"../../../common/vectors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components.common\";\nfunction createBaseRaycastHit() {\n return {\n position: undefined,\n globalOrigin: undefined,\n direction: undefined,\n normalHit: undefined,\n length: 0,\n meshName: undefined,\n entityId: undefined,\n };\n}\n/**\n * @public\n */\nexport var RaycastHit;\n(function (RaycastHit) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.position !== undefined) {\n Vector3.encode(message.position, writer.uint32(10).fork()).ldelim();\n }\n if (message.globalOrigin !== undefined) {\n Vector3.encode(message.globalOrigin, writer.uint32(18).fork()).ldelim();\n }\n if (message.direction !== undefined) {\n Vector3.encode(message.direction, writer.uint32(26).fork()).ldelim();\n }\n if (message.normalHit !== undefined) {\n Vector3.encode(message.normalHit, writer.uint32(34).fork()).ldelim();\n }\n if (message.length !== 0) {\n writer.uint32(45).float(message.length);\n }\n if (message.meshName !== undefined) {\n writer.uint32(50).string(message.meshName);\n }\n if (message.entityId !== undefined) {\n writer.uint32(56).uint32(message.entityId);\n }\n return writer;\n }\n RaycastHit.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRaycastHit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.position = Vector3.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.globalOrigin = Vector3.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.direction = Vector3.decode(reader, reader.uint32());\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.normalHit = Vector3.decode(reader, reader.uint32());\n continue;\n case 5:\n if (tag !== 45) {\n break;\n }\n message.length = reader.float();\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.meshName = reader.string();\n continue;\n case 7:\n if (tag !== 56) {\n break;\n }\n message.entityId = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n RaycastHit.decode = decode;\n})(RaycastHit || (RaycastHit = {}));\n", "import { PBPointerEventsResult } from './pb/decentraland/sdk/components/pointer_events_result.gen';\n/**\n * @internal\n */\nexport const PointerEventsResultSchema = {\n COMPONENT_ID: 1063,\n serialize(value, builder) {\n const writer = PBPointerEventsResult.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBPointerEventsResult.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBPointerEventsResult.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBPointerEventsResult\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBPointerLock() {\n return { isPointerLocked: false };\n}\n/**\n * @public\n */\nexport var PBPointerLock;\n(function (PBPointerLock) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.isPointerLocked === true) {\n writer.uint32(8).bool(message.isPointerLocked);\n }\n return writer;\n }\n PBPointerLock.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBPointerLock();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.isPointerLocked = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBPointerLock.decode = decode;\n})(PBPointerLock || (PBPointerLock = {}));\n", "import { PBPointerLock } from './pb/decentraland/sdk/components/pointer_lock.gen';\n/**\n * @internal\n */\nexport const PointerLockSchema = {\n COMPONENT_ID: 1074,\n serialize(value, builder) {\n const writer = PBPointerLock.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBPointerLock.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBPointerLock.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBPointerLock\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Vector3 } from \"../../common/vectors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/** RaycastQueryType indicates whether the ray should stop on the first collition, or continue. */\n/**\n * @public\n */\nexport var RaycastQueryType;\n(function (RaycastQueryType) {\n /** RQT_HIT_FIRST - Pick the first (not necessarily the closest) hit within the range */\n RaycastQueryType[RaycastQueryType[\"RQT_HIT_FIRST\"] = 0] = \"RQT_HIT_FIRST\";\n /** RQT_QUERY_ALL - Pick all hits within the range */\n RaycastQueryType[RaycastQueryType[\"RQT_QUERY_ALL\"] = 1] = \"RQT_QUERY_ALL\";\n /** RQT_NONE - Do not perform the raycast, only set the raycast result with empty hits */\n RaycastQueryType[RaycastQueryType[\"RQT_NONE\"] = 2] = \"RQT_NONE\";\n})(RaycastQueryType || (RaycastQueryType = {}));\nfunction createBasePBRaycast() {\n return {\n timestamp: undefined,\n originOffset: undefined,\n direction: undefined,\n maxDistance: 0,\n queryType: 0,\n continuous: undefined,\n collisionMask: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBRaycast;\n(function (PBRaycast) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.timestamp !== undefined) {\n writer.uint32(8).uint32(message.timestamp);\n }\n if (message.originOffset !== undefined) {\n Vector3.encode(message.originOffset, writer.uint32(18).fork()).ldelim();\n }\n switch (message.direction?.$case) {\n case \"localDirection\":\n Vector3.encode(message.direction.localDirection, writer.uint32(50).fork()).ldelim();\n break;\n case \"globalDirection\":\n Vector3.encode(message.direction.globalDirection, writer.uint32(26).fork()).ldelim();\n break;\n case \"globalTarget\":\n Vector3.encode(message.direction.globalTarget, writer.uint32(58).fork()).ldelim();\n break;\n case \"targetEntity\":\n writer.uint32(80).uint32(message.direction.targetEntity);\n break;\n }\n if (message.maxDistance !== 0) {\n writer.uint32(37).float(message.maxDistance);\n }\n if (message.queryType !== 0) {\n writer.uint32(40).int32(message.queryType);\n }\n if (message.continuous !== undefined) {\n writer.uint32(64).bool(message.continuous);\n }\n if (message.collisionMask !== undefined) {\n writer.uint32(72).uint32(message.collisionMask);\n }\n return writer;\n }\n PBRaycast.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBRaycast();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.timestamp = reader.uint32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.originOffset = Vector3.decode(reader, reader.uint32());\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.direction = { $case: \"localDirection\", localDirection: Vector3.decode(reader, reader.uint32()) };\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.direction = { $case: \"globalDirection\", globalDirection: Vector3.decode(reader, reader.uint32()) };\n continue;\n case 7:\n if (tag !== 58) {\n break;\n }\n message.direction = { $case: \"globalTarget\", globalTarget: Vector3.decode(reader, reader.uint32()) };\n continue;\n case 10:\n if (tag !== 80) {\n break;\n }\n message.direction = { $case: \"targetEntity\", targetEntity: reader.uint32() };\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.maxDistance = reader.float();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.queryType = reader.int32();\n continue;\n case 8:\n if (tag !== 64) {\n break;\n }\n message.continuous = reader.bool();\n continue;\n case 9:\n if (tag !== 72) {\n break;\n }\n message.collisionMask = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBRaycast.decode = decode;\n})(PBRaycast || (PBRaycast = {}));\n", "import { PBRaycast } from './pb/decentraland/sdk/components/raycast.gen';\n/**\n * @internal\n */\nexport const RaycastSchema = {\n COMPONENT_ID: 1067,\n serialize(value, builder) {\n const writer = PBRaycast.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBRaycast.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBRaycast.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBRaycast\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Vector3 } from \"../../common/vectors.gen\";\nimport { RaycastHit } from \"./common/raycast_hit.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBRaycastResult() {\n return { timestamp: undefined, globalOrigin: undefined, direction: undefined, hits: [], tickNumber: 0 };\n}\n/**\n * @public\n */\nexport var PBRaycastResult;\n(function (PBRaycastResult) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.timestamp !== undefined) {\n writer.uint32(8).uint32(message.timestamp);\n }\n if (message.globalOrigin !== undefined) {\n Vector3.encode(message.globalOrigin, writer.uint32(18).fork()).ldelim();\n }\n if (message.direction !== undefined) {\n Vector3.encode(message.direction, writer.uint32(26).fork()).ldelim();\n }\n for (const v of message.hits) {\n RaycastHit.encode(v, writer.uint32(34).fork()).ldelim();\n }\n if (message.tickNumber !== 0) {\n writer.uint32(40).uint32(message.tickNumber);\n }\n return writer;\n }\n PBRaycastResult.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBRaycastResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.timestamp = reader.uint32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.globalOrigin = Vector3.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.direction = Vector3.decode(reader, reader.uint32());\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.hits.push(RaycastHit.decode(reader, reader.uint32()));\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.tickNumber = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBRaycastResult.decode = decode;\n})(PBRaycastResult || (PBRaycastResult = {}));\n", "import { PBRaycastResult } from './pb/decentraland/sdk/components/raycast_result.gen';\n/**\n * @internal\n */\nexport const RaycastResultSchema = {\n COMPONENT_ID: 1068,\n serialize(value, builder) {\n const writer = PBRaycastResult.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBRaycastResult.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBRaycastResult.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBRaycastResult\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color3, Color4 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBTextShape() {\n return {\n text: \"\",\n font: undefined,\n fontSize: undefined,\n fontAutoSize: undefined,\n textAlign: undefined,\n width: undefined,\n height: undefined,\n paddingTop: undefined,\n paddingRight: undefined,\n paddingBottom: undefined,\n paddingLeft: undefined,\n lineSpacing: undefined,\n lineCount: undefined,\n textWrapping: undefined,\n shadowBlur: undefined,\n shadowOffsetX: undefined,\n shadowOffsetY: undefined,\n outlineWidth: undefined,\n shadowColor: undefined,\n outlineColor: undefined,\n textColor: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBTextShape;\n(function (PBTextShape) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.text !== \"\") {\n writer.uint32(10).string(message.text);\n }\n if (message.font !== undefined) {\n writer.uint32(16).int32(message.font);\n }\n if (message.fontSize !== undefined) {\n writer.uint32(29).float(message.fontSize);\n }\n if (message.fontAutoSize !== undefined) {\n writer.uint32(32).bool(message.fontAutoSize);\n }\n if (message.textAlign !== undefined) {\n writer.uint32(40).int32(message.textAlign);\n }\n if (message.width !== undefined) {\n writer.uint32(53).float(message.width);\n }\n if (message.height !== undefined) {\n writer.uint32(61).float(message.height);\n }\n if (message.paddingTop !== undefined) {\n writer.uint32(69).float(message.paddingTop);\n }\n if (message.paddingRight !== undefined) {\n writer.uint32(77).float(message.paddingRight);\n }\n if (message.paddingBottom !== undefined) {\n writer.uint32(85).float(message.paddingBottom);\n }\n if (message.paddingLeft !== undefined) {\n writer.uint32(93).float(message.paddingLeft);\n }\n if (message.lineSpacing !== undefined) {\n writer.uint32(101).float(message.lineSpacing);\n }\n if (message.lineCount !== undefined) {\n writer.uint32(104).int32(message.lineCount);\n }\n if (message.textWrapping !== undefined) {\n writer.uint32(112).bool(message.textWrapping);\n }\n if (message.shadowBlur !== undefined) {\n writer.uint32(125).float(message.shadowBlur);\n }\n if (message.shadowOffsetX !== undefined) {\n writer.uint32(133).float(message.shadowOffsetX);\n }\n if (message.shadowOffsetY !== undefined) {\n writer.uint32(141).float(message.shadowOffsetY);\n }\n if (message.outlineWidth !== undefined) {\n writer.uint32(149).float(message.outlineWidth);\n }\n if (message.shadowColor !== undefined) {\n Color3.encode(message.shadowColor, writer.uint32(154).fork()).ldelim();\n }\n if (message.outlineColor !== undefined) {\n Color3.encode(message.outlineColor, writer.uint32(162).fork()).ldelim();\n }\n if (message.textColor !== undefined) {\n Color4.encode(message.textColor, writer.uint32(170).fork()).ldelim();\n }\n return writer;\n }\n PBTextShape.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBTextShape();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.text = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.font = reader.int32();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.fontSize = reader.float();\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.fontAutoSize = reader.bool();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.textAlign = reader.int32();\n continue;\n case 6:\n if (tag !== 53) {\n break;\n }\n message.width = reader.float();\n continue;\n case 7:\n if (tag !== 61) {\n break;\n }\n message.height = reader.float();\n continue;\n case 8:\n if (tag !== 69) {\n break;\n }\n message.paddingTop = reader.float();\n continue;\n case 9:\n if (tag !== 77) {\n break;\n }\n message.paddingRight = reader.float();\n continue;\n case 10:\n if (tag !== 85) {\n break;\n }\n message.paddingBottom = reader.float();\n continue;\n case 11:\n if (tag !== 93) {\n break;\n }\n message.paddingLeft = reader.float();\n continue;\n case 12:\n if (tag !== 101) {\n break;\n }\n message.lineSpacing = reader.float();\n continue;\n case 13:\n if (tag !== 104) {\n break;\n }\n message.lineCount = reader.int32();\n continue;\n case 14:\n if (tag !== 112) {\n break;\n }\n message.textWrapping = reader.bool();\n continue;\n case 15:\n if (tag !== 125) {\n break;\n }\n message.shadowBlur = reader.float();\n continue;\n case 16:\n if (tag !== 133) {\n break;\n }\n message.shadowOffsetX = reader.float();\n continue;\n case 17:\n if (tag !== 141) {\n break;\n }\n message.shadowOffsetY = reader.float();\n continue;\n case 18:\n if (tag !== 149) {\n break;\n }\n message.outlineWidth = reader.float();\n continue;\n case 19:\n if (tag !== 154) {\n break;\n }\n message.shadowColor = Color3.decode(reader, reader.uint32());\n continue;\n case 20:\n if (tag !== 162) {\n break;\n }\n message.outlineColor = Color3.decode(reader, reader.uint32());\n continue;\n case 21:\n if (tag !== 170) {\n break;\n }\n message.textColor = Color4.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBTextShape.decode = decode;\n})(PBTextShape || (PBTextShape = {}));\n", "import { PBTextShape } from './pb/decentraland/sdk/components/text_shape.gen';\n/**\n * @internal\n */\nexport const TextShapeSchema = {\n COMPONENT_ID: 1030,\n serialize(value, builder) {\n const writer = PBTextShape.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBTextShape.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBTextShape.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBTextShape\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Quaternion, Vector3 } from \"../../common/vectors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * Implementation guidelines for these easing functions can be found\n * at https://github.com/ai/easings.net/blob/6fcd5f852a470bf1a7890e8178afa0f471d5f2ec/src/easings/easingsFunctions.ts\n */\n/**\n * @public\n */\nexport var EasingFunction;\n(function (EasingFunction) {\n /** EF_LINEAR - default */\n EasingFunction[EasingFunction[\"EF_LINEAR\"] = 0] = \"EF_LINEAR\";\n EasingFunction[EasingFunction[\"EF_EASEINQUAD\"] = 1] = \"EF_EASEINQUAD\";\n EasingFunction[EasingFunction[\"EF_EASEOUTQUAD\"] = 2] = \"EF_EASEOUTQUAD\";\n EasingFunction[EasingFunction[\"EF_EASEQUAD\"] = 3] = \"EF_EASEQUAD\";\n EasingFunction[EasingFunction[\"EF_EASEINSINE\"] = 4] = \"EF_EASEINSINE\";\n EasingFunction[EasingFunction[\"EF_EASEOUTSINE\"] = 5] = \"EF_EASEOUTSINE\";\n EasingFunction[EasingFunction[\"EF_EASESINE\"] = 6] = \"EF_EASESINE\";\n EasingFunction[EasingFunction[\"EF_EASEINEXPO\"] = 7] = \"EF_EASEINEXPO\";\n EasingFunction[EasingFunction[\"EF_EASEOUTEXPO\"] = 8] = \"EF_EASEOUTEXPO\";\n EasingFunction[EasingFunction[\"EF_EASEEXPO\"] = 9] = \"EF_EASEEXPO\";\n EasingFunction[EasingFunction[\"EF_EASEINELASTIC\"] = 10] = \"EF_EASEINELASTIC\";\n EasingFunction[EasingFunction[\"EF_EASEOUTELASTIC\"] = 11] = \"EF_EASEOUTELASTIC\";\n EasingFunction[EasingFunction[\"EF_EASEELASTIC\"] = 12] = \"EF_EASEELASTIC\";\n EasingFunction[EasingFunction[\"EF_EASEINBOUNCE\"] = 13] = \"EF_EASEINBOUNCE\";\n EasingFunction[EasingFunction[\"EF_EASEOUTBOUNCE\"] = 14] = \"EF_EASEOUTBOUNCE\";\n EasingFunction[EasingFunction[\"EF_EASEBOUNCE\"] = 15] = \"EF_EASEBOUNCE\";\n EasingFunction[EasingFunction[\"EF_EASEINCUBIC\"] = 16] = \"EF_EASEINCUBIC\";\n EasingFunction[EasingFunction[\"EF_EASEOUTCUBIC\"] = 17] = \"EF_EASEOUTCUBIC\";\n EasingFunction[EasingFunction[\"EF_EASECUBIC\"] = 18] = \"EF_EASECUBIC\";\n EasingFunction[EasingFunction[\"EF_EASEINQUART\"] = 19] = \"EF_EASEINQUART\";\n EasingFunction[EasingFunction[\"EF_EASEOUTQUART\"] = 20] = \"EF_EASEOUTQUART\";\n EasingFunction[EasingFunction[\"EF_EASEQUART\"] = 21] = \"EF_EASEQUART\";\n EasingFunction[EasingFunction[\"EF_EASEINQUINT\"] = 22] = \"EF_EASEINQUINT\";\n EasingFunction[EasingFunction[\"EF_EASEOUTQUINT\"] = 23] = \"EF_EASEOUTQUINT\";\n EasingFunction[EasingFunction[\"EF_EASEQUINT\"] = 24] = \"EF_EASEQUINT\";\n EasingFunction[EasingFunction[\"EF_EASEINCIRC\"] = 25] = \"EF_EASEINCIRC\";\n EasingFunction[EasingFunction[\"EF_EASEOUTCIRC\"] = 26] = \"EF_EASEOUTCIRC\";\n EasingFunction[EasingFunction[\"EF_EASECIRC\"] = 27] = \"EF_EASECIRC\";\n EasingFunction[EasingFunction[\"EF_EASEINBACK\"] = 28] = \"EF_EASEINBACK\";\n EasingFunction[EasingFunction[\"EF_EASEOUTBACK\"] = 29] = \"EF_EASEOUTBACK\";\n EasingFunction[EasingFunction[\"EF_EASEBACK\"] = 30] = \"EF_EASEBACK\";\n})(EasingFunction || (EasingFunction = {}));\nfunction createBasePBTween() {\n return { duration: 0, easingFunction: 0, mode: undefined, playing: undefined, currentTime: undefined };\n}\n/**\n * @public\n */\nexport var PBTween;\n(function (PBTween) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.duration !== 0) {\n writer.uint32(13).float(message.duration);\n }\n if (message.easingFunction !== 0) {\n writer.uint32(16).int32(message.easingFunction);\n }\n switch (message.mode?.$case) {\n case \"move\":\n Move.encode(message.mode.move, writer.uint32(26).fork()).ldelim();\n break;\n case \"rotate\":\n Rotate.encode(message.mode.rotate, writer.uint32(34).fork()).ldelim();\n break;\n case \"scale\":\n Scale.encode(message.mode.scale, writer.uint32(42).fork()).ldelim();\n break;\n }\n if (message.playing !== undefined) {\n writer.uint32(48).bool(message.playing);\n }\n if (message.currentTime !== undefined) {\n writer.uint32(61).float(message.currentTime);\n }\n return writer;\n }\n PBTween.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBTween();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.duration = reader.float();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.easingFunction = reader.int32();\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.mode = { $case: \"move\", move: Move.decode(reader, reader.uint32()) };\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.mode = { $case: \"rotate\", rotate: Rotate.decode(reader, reader.uint32()) };\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.mode = { $case: \"scale\", scale: Scale.decode(reader, reader.uint32()) };\n continue;\n case 6:\n if (tag !== 48) {\n break;\n }\n message.playing = reader.bool();\n continue;\n case 7:\n if (tag !== 61) {\n break;\n }\n message.currentTime = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBTween.decode = decode;\n})(PBTween || (PBTween = {}));\nfunction createBaseMove() {\n return { start: undefined, end: undefined, faceDirection: undefined };\n}\n/**\n * @public\n */\nexport var Move;\n(function (Move) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.start !== undefined) {\n Vector3.encode(message.start, writer.uint32(10).fork()).ldelim();\n }\n if (message.end !== undefined) {\n Vector3.encode(message.end, writer.uint32(18).fork()).ldelim();\n }\n if (message.faceDirection !== undefined) {\n writer.uint32(24).bool(message.faceDirection);\n }\n return writer;\n }\n Move.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMove();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.start = Vector3.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.end = Vector3.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.faceDirection = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Move.decode = decode;\n})(Move || (Move = {}));\nfunction createBaseRotate() {\n return { start: undefined, end: undefined };\n}\n/**\n * @public\n */\nexport var Rotate;\n(function (Rotate) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.start !== undefined) {\n Quaternion.encode(message.start, writer.uint32(10).fork()).ldelim();\n }\n if (message.end !== undefined) {\n Quaternion.encode(message.end, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n Rotate.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRotate();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.start = Quaternion.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.end = Quaternion.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Rotate.decode = decode;\n})(Rotate || (Rotate = {}));\nfunction createBaseScale() {\n return { start: undefined, end: undefined };\n}\n/**\n * @public\n */\nexport var Scale;\n(function (Scale) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.start !== undefined) {\n Vector3.encode(message.start, writer.uint32(10).fork()).ldelim();\n }\n if (message.end !== undefined) {\n Vector3.encode(message.end, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n Scale.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseScale();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.start = Vector3.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.end = Vector3.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Scale.decode = decode;\n})(Scale || (Scale = {}));\n", "import { PBTween } from './pb/decentraland/sdk/components/tween.gen';\n/**\n * @internal\n */\nexport const TweenSchema = {\n COMPONENT_ID: 1102,\n serialize(value, builder) {\n const writer = PBTween.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBTween.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBTween.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBTween\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { PBTween } from \"./tween.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var TweenLoop;\n(function (TweenLoop) {\n TweenLoop[TweenLoop[\"TL_RESTART\"] = 0] = \"TL_RESTART\";\n TweenLoop[TweenLoop[\"TL_YOYO\"] = 1] = \"TL_YOYO\";\n})(TweenLoop || (TweenLoop = {}));\nfunction createBasePBTweenSequence() {\n return { sequence: [], loop: undefined };\n}\n/**\n * @public\n */\nexport var PBTweenSequence;\n(function (PBTweenSequence) {\n function encode(message, writer = _m0.Writer.create()) {\n for (const v of message.sequence) {\n PBTween.encode(v, writer.uint32(10).fork()).ldelim();\n }\n if (message.loop !== undefined) {\n writer.uint32(16).int32(message.loop);\n }\n return writer;\n }\n PBTweenSequence.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBTweenSequence();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.sequence.push(PBTween.decode(reader, reader.uint32()));\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.loop = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBTweenSequence.decode = decode;\n})(PBTweenSequence || (PBTweenSequence = {}));\n", "import { PBTweenSequence } from './pb/decentraland/sdk/components/tween_sequence.gen';\n/**\n * @internal\n */\nexport const TweenSequenceSchema = {\n COMPONENT_ID: 1104,\n serialize(value, builder) {\n const writer = PBTweenSequence.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBTweenSequence.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBTweenSequence.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBTweenSequence\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var TweenStateStatus;\n(function (TweenStateStatus) {\n TweenStateStatus[TweenStateStatus[\"TS_ACTIVE\"] = 0] = \"TS_ACTIVE\";\n TweenStateStatus[TweenStateStatus[\"TS_COMPLETED\"] = 1] = \"TS_COMPLETED\";\n TweenStateStatus[TweenStateStatus[\"TS_PAUSED\"] = 2] = \"TS_PAUSED\";\n})(TweenStateStatus || (TweenStateStatus = {}));\nfunction createBasePBTweenState() {\n return { state: 0, currentTime: 0 };\n}\n/**\n * @public\n */\nexport var PBTweenState;\n(function (PBTweenState) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.state !== 0) {\n writer.uint32(8).int32(message.state);\n }\n if (message.currentTime !== 0) {\n writer.uint32(21).float(message.currentTime);\n }\n return writer;\n }\n PBTweenState.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBTweenState();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.state = reader.int32();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.currentTime = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBTweenState.decode = decode;\n})(PBTweenState || (PBTweenState = {}));\n", "import { PBTweenState } from './pb/decentraland/sdk/components/tween_state.gen';\n/**\n * @internal\n */\nexport const TweenStateSchema = {\n COMPONENT_ID: 1103,\n serialize(value, builder) {\n const writer = PBTweenState.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBTweenState.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBTweenState.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBTweenState\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { BorderRect } from \"../../common/border_rect.gen\";\nimport { Color4 } from \"../../common/colors.gen\";\nimport { TextureUnion } from \"../../common/texture.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var BackgroundTextureMode;\n(function (BackgroundTextureMode) {\n /**\n * NINE_SLICES - https://docs.unity3d.com/Manual/UIE-USS-SupportedProperties.html (Slicing section)\n * https://forum.unity.com/threads/how-does-slicing-in-ui-tookkit-works.1235863/\n * https://docs.unity3d.com/Manual/9SliceSprites.html\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-slice\n */\n BackgroundTextureMode[BackgroundTextureMode[\"NINE_SLICES\"] = 0] = \"NINE_SLICES\";\n /**\n * CENTER - CENTER enables the texture to be rendered centered in relation to the\n * element. If the element is smaller than the texture then the background\n * should use the element as stencil to cut off the out-of-bounds area\n */\n BackgroundTextureMode[BackgroundTextureMode[\"CENTER\"] = 1] = \"CENTER\";\n /**\n * STRETCH - STRETCH enables the texture to cover all the area of the container,\n * adopting its aspect ratio.\n */\n BackgroundTextureMode[BackgroundTextureMode[\"STRETCH\"] = 2] = \"STRETCH\";\n})(BackgroundTextureMode || (BackgroundTextureMode = {}));\nfunction createBasePBUiBackground() {\n return { color: undefined, texture: undefined, textureMode: 0, textureSlices: undefined, uvs: [] };\n}\n/**\n * @public\n */\nexport var PBUiBackground;\n(function (PBUiBackground) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.color !== undefined) {\n Color4.encode(message.color, writer.uint32(10).fork()).ldelim();\n }\n if (message.texture !== undefined) {\n TextureUnion.encode(message.texture, writer.uint32(18).fork()).ldelim();\n }\n if (message.textureMode !== 0) {\n writer.uint32(24).int32(message.textureMode);\n }\n if (message.textureSlices !== undefined) {\n BorderRect.encode(message.textureSlices, writer.uint32(34).fork()).ldelim();\n }\n writer.uint32(42).fork();\n for (const v of message.uvs) {\n writer.float(v);\n }\n writer.ldelim();\n return writer;\n }\n PBUiBackground.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiBackground();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.color = Color4.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.texture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.textureMode = reader.int32();\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.textureSlices = BorderRect.decode(reader, reader.uint32());\n continue;\n case 5:\n if (tag === 45) {\n message.uvs.push(reader.float());\n continue;\n }\n if (tag === 42) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.uvs.push(reader.float());\n }\n continue;\n }\n break;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiBackground.decode = decode;\n})(PBUiBackground || (PBUiBackground = {}));\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.common\";\nfunction createBaseBorderRect() {\n return { top: 0, left: 0, right: 0, bottom: 0 };\n}\n/**\n * @public\n */\nexport var BorderRect;\n(function (BorderRect) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.top !== 0) {\n writer.uint32(13).float(message.top);\n }\n if (message.left !== 0) {\n writer.uint32(21).float(message.left);\n }\n if (message.right !== 0) {\n writer.uint32(29).float(message.right);\n }\n if (message.bottom !== 0) {\n writer.uint32(37).float(message.bottom);\n }\n return writer;\n }\n BorderRect.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBorderRect();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.top = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.left = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.right = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.bottom = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n BorderRect.decode = decode;\n})(BorderRect || (BorderRect = {}));\nfunction createBaseRect() {\n return { x: 0, y: 0, width: 0, height: 0 };\n}\n/**\n * @public\n */\nexport var Rect;\n(function (Rect) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.x !== 0) {\n writer.uint32(13).float(message.x);\n }\n if (message.y !== 0) {\n writer.uint32(21).float(message.y);\n }\n if (message.width !== 0) {\n writer.uint32(29).float(message.width);\n }\n if (message.height !== 0) {\n writer.uint32(37).float(message.height);\n }\n return writer;\n }\n Rect.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRect();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.x = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.y = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.width = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.height = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Rect.decode = decode;\n})(Rect || (Rect = {}));\n", "import { PBUiBackground } from './pb/decentraland/sdk/components/ui_background.gen';\n/**\n * @internal\n */\nexport const UiBackgroundSchema = {\n COMPONENT_ID: 1053,\n serialize(value, builder) {\n const writer = PBUiBackground.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiBackground.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiBackground.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiBackground\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { BorderRect } from \"../../common/border_rect.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiCanvasInformation() {\n return { devicePixelRatio: 0, width: 0, height: 0, interactableArea: undefined };\n}\n/**\n * @public\n */\nexport var PBUiCanvasInformation;\n(function (PBUiCanvasInformation) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.devicePixelRatio !== 0) {\n writer.uint32(13).float(message.devicePixelRatio);\n }\n if (message.width !== 0) {\n writer.uint32(16).int32(message.width);\n }\n if (message.height !== 0) {\n writer.uint32(24).int32(message.height);\n }\n if (message.interactableArea !== undefined) {\n BorderRect.encode(message.interactableArea, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n }\n PBUiCanvasInformation.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiCanvasInformation();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.devicePixelRatio = reader.float();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.width = reader.int32();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.height = reader.int32();\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.interactableArea = BorderRect.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiCanvasInformation.decode = decode;\n})(PBUiCanvasInformation || (PBUiCanvasInformation = {}));\n", "import { PBUiCanvasInformation } from './pb/decentraland/sdk/components/ui_canvas_information.gen';\n/**\n * @internal\n */\nexport const UiCanvasInformationSchema = {\n COMPONENT_ID: 1054,\n serialize(value, builder) {\n const writer = PBUiCanvasInformation.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiCanvasInformation.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiCanvasInformation.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiCanvasInformation\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color4 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiDropdown() {\n return {\n acceptEmpty: false,\n emptyLabel: undefined,\n options: [],\n selectedIndex: undefined,\n disabled: false,\n color: undefined,\n textAlign: undefined,\n font: undefined,\n fontSize: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBUiDropdown;\n(function (PBUiDropdown) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.acceptEmpty === true) {\n writer.uint32(8).bool(message.acceptEmpty);\n }\n if (message.emptyLabel !== undefined) {\n writer.uint32(18).string(message.emptyLabel);\n }\n for (const v of message.options) {\n writer.uint32(26).string(v);\n }\n if (message.selectedIndex !== undefined) {\n writer.uint32(32).int32(message.selectedIndex);\n }\n if (message.disabled === true) {\n writer.uint32(40).bool(message.disabled);\n }\n if (message.color !== undefined) {\n Color4.encode(message.color, writer.uint32(50).fork()).ldelim();\n }\n if (message.textAlign !== undefined) {\n writer.uint32(80).int32(message.textAlign);\n }\n if (message.font !== undefined) {\n writer.uint32(88).int32(message.font);\n }\n if (message.fontSize !== undefined) {\n writer.uint32(96).int32(message.fontSize);\n }\n return writer;\n }\n PBUiDropdown.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiDropdown();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.acceptEmpty = reader.bool();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.emptyLabel = reader.string();\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.options.push(reader.string());\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.selectedIndex = reader.int32();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.disabled = reader.bool();\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.color = Color4.decode(reader, reader.uint32());\n continue;\n case 10:\n if (tag !== 80) {\n break;\n }\n message.textAlign = reader.int32();\n continue;\n case 11:\n if (tag !== 88) {\n break;\n }\n message.font = reader.int32();\n continue;\n case 12:\n if (tag !== 96) {\n break;\n }\n message.fontSize = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiDropdown.decode = decode;\n})(PBUiDropdown || (PBUiDropdown = {}));\n", "import { PBUiDropdown } from './pb/decentraland/sdk/components/ui_dropdown.gen';\n/**\n * @internal\n */\nexport const UiDropdownSchema = {\n COMPONENT_ID: 1094,\n serialize(value, builder) {\n const writer = PBUiDropdown.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiDropdown.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiDropdown.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiDropdown\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiDropdownResult() {\n return { value: 0 };\n}\n/**\n * @public\n */\nexport var PBUiDropdownResult;\n(function (PBUiDropdownResult) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.value !== 0) {\n writer.uint32(8).int32(message.value);\n }\n return writer;\n }\n PBUiDropdownResult.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiDropdownResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.value = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiDropdownResult.decode = decode;\n})(PBUiDropdownResult || (PBUiDropdownResult = {}));\n", "import { PBUiDropdownResult } from './pb/decentraland/sdk/components/ui_dropdown_result.gen';\n/**\n * @internal\n */\nexport const UiDropdownResultSchema = {\n COMPONENT_ID: 1096,\n serialize(value, builder) {\n const writer = PBUiDropdownResult.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiDropdownResult.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiDropdownResult.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiDropdownResult\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color4 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiInput() {\n return {\n placeholder: \"\",\n color: undefined,\n placeholderColor: undefined,\n disabled: false,\n textAlign: undefined,\n font: undefined,\n fontSize: undefined,\n value: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBUiInput;\n(function (PBUiInput) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.placeholder !== \"\") {\n writer.uint32(10).string(message.placeholder);\n }\n if (message.color !== undefined) {\n Color4.encode(message.color, writer.uint32(18).fork()).ldelim();\n }\n if (message.placeholderColor !== undefined) {\n Color4.encode(message.placeholderColor, writer.uint32(26).fork()).ldelim();\n }\n if (message.disabled === true) {\n writer.uint32(32).bool(message.disabled);\n }\n if (message.textAlign !== undefined) {\n writer.uint32(80).int32(message.textAlign);\n }\n if (message.font !== undefined) {\n writer.uint32(88).int32(message.font);\n }\n if (message.fontSize !== undefined) {\n writer.uint32(96).int32(message.fontSize);\n }\n if (message.value !== undefined) {\n writer.uint32(106).string(message.value);\n }\n return writer;\n }\n PBUiInput.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiInput();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.placeholder = reader.string();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.color = Color4.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.placeholderColor = Color4.decode(reader, reader.uint32());\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.disabled = reader.bool();\n continue;\n case 10:\n if (tag !== 80) {\n break;\n }\n message.textAlign = reader.int32();\n continue;\n case 11:\n if (tag !== 88) {\n break;\n }\n message.font = reader.int32();\n continue;\n case 12:\n if (tag !== 96) {\n break;\n }\n message.fontSize = reader.int32();\n continue;\n case 13:\n if (tag !== 106) {\n break;\n }\n message.value = reader.string();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiInput.decode = decode;\n})(PBUiInput || (PBUiInput = {}));\n", "import { PBUiInput } from './pb/decentraland/sdk/components/ui_input.gen';\n/**\n * @internal\n */\nexport const UiInputSchema = {\n COMPONENT_ID: 1093,\n serialize(value, builder) {\n const writer = PBUiInput.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiInput.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiInput.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiInput\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiInputResult() {\n return { value: \"\" };\n}\n/**\n * @public\n */\nexport var PBUiInputResult;\n(function (PBUiInputResult) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.value !== \"\") {\n writer.uint32(10).string(message.value);\n }\n return writer;\n }\n PBUiInputResult.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiInputResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.value = reader.string();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiInputResult.decode = decode;\n})(PBUiInputResult || (PBUiInputResult = {}));\n", "import { PBUiInputResult } from './pb/decentraland/sdk/components/ui_input_result.gen';\n/**\n * @internal\n */\nexport const UiInputResultSchema = {\n COMPONENT_ID: 1095,\n serialize(value, builder) {\n const writer = PBUiInputResult.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiInputResult.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiInputResult.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiInputResult\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color4 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiText() {\n return { value: \"\", color: undefined, textAlign: undefined, font: undefined, fontSize: undefined };\n}\n/**\n * @public\n */\nexport var PBUiText;\n(function (PBUiText) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.value !== \"\") {\n writer.uint32(10).string(message.value);\n }\n if (message.color !== undefined) {\n Color4.encode(message.color, writer.uint32(18).fork()).ldelim();\n }\n if (message.textAlign !== undefined) {\n writer.uint32(24).int32(message.textAlign);\n }\n if (message.font !== undefined) {\n writer.uint32(32).int32(message.font);\n }\n if (message.fontSize !== undefined) {\n writer.uint32(40).int32(message.fontSize);\n }\n return writer;\n }\n PBUiText.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiText();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.value = reader.string();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.color = Color4.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.textAlign = reader.int32();\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.font = reader.int32();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.fontSize = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiText.decode = decode;\n})(PBUiText || (PBUiText = {}));\n", "import { PBUiText } from './pb/decentraland/sdk/components/ui_text.gen';\n/**\n * @internal\n */\nexport const UiTextSchema = {\n COMPONENT_ID: 1052,\n serialize(value, builder) {\n const writer = PBUiText.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiText.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiText.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiText\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var YGPositionType;\n(function (YGPositionType) {\n YGPositionType[YGPositionType[\"YGPT_RELATIVE\"] = 0] = \"YGPT_RELATIVE\";\n YGPositionType[YGPositionType[\"YGPT_ABSOLUTE\"] = 1] = \"YGPT_ABSOLUTE\";\n})(YGPositionType || (YGPositionType = {}));\n/**\n * @public\n */\nexport var YGAlign;\n(function (YGAlign) {\n YGAlign[YGAlign[\"YGA_AUTO\"] = 0] = \"YGA_AUTO\";\n YGAlign[YGAlign[\"YGA_FLEX_START\"] = 1] = \"YGA_FLEX_START\";\n YGAlign[YGAlign[\"YGA_CENTER\"] = 2] = \"YGA_CENTER\";\n YGAlign[YGAlign[\"YGA_FLEX_END\"] = 3] = \"YGA_FLEX_END\";\n YGAlign[YGAlign[\"YGA_STRETCH\"] = 4] = \"YGA_STRETCH\";\n YGAlign[YGAlign[\"YGA_BASELINE\"] = 5] = \"YGA_BASELINE\";\n YGAlign[YGAlign[\"YGA_SPACE_BETWEEN\"] = 6] = \"YGA_SPACE_BETWEEN\";\n YGAlign[YGAlign[\"YGA_SPACE_AROUND\"] = 7] = \"YGA_SPACE_AROUND\";\n})(YGAlign || (YGAlign = {}));\n/**\n * @public\n */\nexport var YGUnit;\n(function (YGUnit) {\n YGUnit[YGUnit[\"YGU_UNDEFINED\"] = 0] = \"YGU_UNDEFINED\";\n YGUnit[YGUnit[\"YGU_POINT\"] = 1] = \"YGU_POINT\";\n YGUnit[YGUnit[\"YGU_PERCENT\"] = 2] = \"YGU_PERCENT\";\n YGUnit[YGUnit[\"YGU_AUTO\"] = 3] = \"YGU_AUTO\";\n})(YGUnit || (YGUnit = {}));\n/**\n * @public\n */\nexport var YGFlexDirection;\n(function (YGFlexDirection) {\n YGFlexDirection[YGFlexDirection[\"YGFD_ROW\"] = 0] = \"YGFD_ROW\";\n YGFlexDirection[YGFlexDirection[\"YGFD_COLUMN\"] = 1] = \"YGFD_COLUMN\";\n YGFlexDirection[YGFlexDirection[\"YGFD_COLUMN_REVERSE\"] = 2] = \"YGFD_COLUMN_REVERSE\";\n YGFlexDirection[YGFlexDirection[\"YGFD_ROW_REVERSE\"] = 3] = \"YGFD_ROW_REVERSE\";\n})(YGFlexDirection || (YGFlexDirection = {}));\n/**\n * @public\n */\nexport var YGWrap;\n(function (YGWrap) {\n YGWrap[YGWrap[\"YGW_NO_WRAP\"] = 0] = \"YGW_NO_WRAP\";\n YGWrap[YGWrap[\"YGW_WRAP\"] = 1] = \"YGW_WRAP\";\n YGWrap[YGWrap[\"YGW_WRAP_REVERSE\"] = 2] = \"YGW_WRAP_REVERSE\";\n})(YGWrap || (YGWrap = {}));\n/**\n * @public\n */\nexport var YGJustify;\n(function (YGJustify) {\n YGJustify[YGJustify[\"YGJ_FLEX_START\"] = 0] = \"YGJ_FLEX_START\";\n YGJustify[YGJustify[\"YGJ_CENTER\"] = 1] = \"YGJ_CENTER\";\n YGJustify[YGJustify[\"YGJ_FLEX_END\"] = 2] = \"YGJ_FLEX_END\";\n YGJustify[YGJustify[\"YGJ_SPACE_BETWEEN\"] = 3] = \"YGJ_SPACE_BETWEEN\";\n YGJustify[YGJustify[\"YGJ_SPACE_AROUND\"] = 4] = \"YGJ_SPACE_AROUND\";\n YGJustify[YGJustify[\"YGJ_SPACE_EVENLY\"] = 5] = \"YGJ_SPACE_EVENLY\";\n})(YGJustify || (YGJustify = {}));\n/**\n * @public\n */\nexport var YGOverflow;\n(function (YGOverflow) {\n YGOverflow[YGOverflow[\"YGO_VISIBLE\"] = 0] = \"YGO_VISIBLE\";\n YGOverflow[YGOverflow[\"YGO_HIDDEN\"] = 1] = \"YGO_HIDDEN\";\n YGOverflow[YGOverflow[\"YGO_SCROLL\"] = 2] = \"YGO_SCROLL\";\n})(YGOverflow || (YGOverflow = {}));\n/**\n * @public\n */\nexport var YGDisplay;\n(function (YGDisplay) {\n YGDisplay[YGDisplay[\"YGD_FLEX\"] = 0] = \"YGD_FLEX\";\n YGDisplay[YGDisplay[\"YGD_NONE\"] = 1] = \"YGD_NONE\";\n})(YGDisplay || (YGDisplay = {}));\n/**\n * @public\n */\nexport var YGEdge;\n(function (YGEdge) {\n YGEdge[YGEdge[\"YGE_LEFT\"] = 0] = \"YGE_LEFT\";\n YGEdge[YGEdge[\"YGE_TOP\"] = 1] = \"YGE_TOP\";\n YGEdge[YGEdge[\"YGE_RIGHT\"] = 2] = \"YGE_RIGHT\";\n YGEdge[YGEdge[\"YGE_BOTTOM\"] = 3] = \"YGE_BOTTOM\";\n YGEdge[YGEdge[\"YGE_START\"] = 4] = \"YGE_START\";\n YGEdge[YGEdge[\"YGE_END\"] = 5] = \"YGE_END\";\n YGEdge[YGEdge[\"YGE_HORIZONTAL\"] = 6] = \"YGE_HORIZONTAL\";\n YGEdge[YGEdge[\"YGE_VERTICAL\"] = 7] = \"YGE_VERTICAL\";\n YGEdge[YGEdge[\"YGE_ALL\"] = 8] = \"YGE_ALL\";\n})(YGEdge || (YGEdge = {}));\n/**\n * @public\n */\nexport var PointerFilterMode;\n(function (PointerFilterMode) {\n PointerFilterMode[PointerFilterMode[\"PFM_NONE\"] = 0] = \"PFM_NONE\";\n PointerFilterMode[PointerFilterMode[\"PFM_BLOCK\"] = 1] = \"PFM_BLOCK\";\n})(PointerFilterMode || (PointerFilterMode = {}));\nfunction createBasePBUiTransform() {\n return {\n parent: 0,\n rightOf: 0,\n alignContent: undefined,\n alignItems: undefined,\n flexWrap: undefined,\n flexShrink: undefined,\n positionType: 0,\n alignSelf: 0,\n flexDirection: 0,\n justifyContent: 0,\n overflow: 0,\n display: 0,\n flexBasisUnit: 0,\n flexBasis: 0,\n flexGrow: 0,\n widthUnit: 0,\n width: 0,\n heightUnit: 0,\n height: 0,\n minWidthUnit: 0,\n minWidth: 0,\n minHeightUnit: 0,\n minHeight: 0,\n maxWidthUnit: 0,\n maxWidth: 0,\n maxHeightUnit: 0,\n maxHeight: 0,\n positionLeftUnit: 0,\n positionLeft: 0,\n positionTopUnit: 0,\n positionTop: 0,\n positionRightUnit: 0,\n positionRight: 0,\n positionBottomUnit: 0,\n positionBottom: 0,\n marginLeftUnit: 0,\n marginLeft: 0,\n marginTopUnit: 0,\n marginTop: 0,\n marginRightUnit: 0,\n marginRight: 0,\n marginBottomUnit: 0,\n marginBottom: 0,\n paddingLeftUnit: 0,\n paddingLeft: 0,\n paddingTopUnit: 0,\n paddingTop: 0,\n paddingRightUnit: 0,\n paddingRight: 0,\n paddingBottomUnit: 0,\n paddingBottom: 0,\n pointerFilter: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBUiTransform;\n(function (PBUiTransform) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.parent !== 0) {\n writer.uint32(8).int32(message.parent);\n }\n if (message.rightOf !== 0) {\n writer.uint32(16).int32(message.rightOf);\n }\n if (message.alignContent !== undefined) {\n writer.uint32(24).int32(message.alignContent);\n }\n if (message.alignItems !== undefined) {\n writer.uint32(32).int32(message.alignItems);\n }\n if (message.flexWrap !== undefined) {\n writer.uint32(40).int32(message.flexWrap);\n }\n if (message.flexShrink !== undefined) {\n writer.uint32(53).float(message.flexShrink);\n }\n if (message.positionType !== 0) {\n writer.uint32(56).int32(message.positionType);\n }\n if (message.alignSelf !== 0) {\n writer.uint32(64).int32(message.alignSelf);\n }\n if (message.flexDirection !== 0) {\n writer.uint32(72).int32(message.flexDirection);\n }\n if (message.justifyContent !== 0) {\n writer.uint32(80).int32(message.justifyContent);\n }\n if (message.overflow !== 0) {\n writer.uint32(88).int32(message.overflow);\n }\n if (message.display !== 0) {\n writer.uint32(96).int32(message.display);\n }\n if (message.flexBasisUnit !== 0) {\n writer.uint32(104).int32(message.flexBasisUnit);\n }\n if (message.flexBasis !== 0) {\n writer.uint32(117).float(message.flexBasis);\n }\n if (message.flexGrow !== 0) {\n writer.uint32(125).float(message.flexGrow);\n }\n if (message.widthUnit !== 0) {\n writer.uint32(128).int32(message.widthUnit);\n }\n if (message.width !== 0) {\n writer.uint32(141).float(message.width);\n }\n if (message.heightUnit !== 0) {\n writer.uint32(144).int32(message.heightUnit);\n }\n if (message.height !== 0) {\n writer.uint32(157).float(message.height);\n }\n if (message.minWidthUnit !== 0) {\n writer.uint32(160).int32(message.minWidthUnit);\n }\n if (message.minWidth !== 0) {\n writer.uint32(173).float(message.minWidth);\n }\n if (message.minHeightUnit !== 0) {\n writer.uint32(176).int32(message.minHeightUnit);\n }\n if (message.minHeight !== 0) {\n writer.uint32(189).float(message.minHeight);\n }\n if (message.maxWidthUnit !== 0) {\n writer.uint32(192).int32(message.maxWidthUnit);\n }\n if (message.maxWidth !== 0) {\n writer.uint32(205).float(message.maxWidth);\n }\n if (message.maxHeightUnit !== 0) {\n writer.uint32(208).int32(message.maxHeightUnit);\n }\n if (message.maxHeight !== 0) {\n writer.uint32(221).float(message.maxHeight);\n }\n if (message.positionLeftUnit !== 0) {\n writer.uint32(224).int32(message.positionLeftUnit);\n }\n if (message.positionLeft !== 0) {\n writer.uint32(237).float(message.positionLeft);\n }\n if (message.positionTopUnit !== 0) {\n writer.uint32(240).int32(message.positionTopUnit);\n }\n if (message.positionTop !== 0) {\n writer.uint32(253).float(message.positionTop);\n }\n if (message.positionRightUnit !== 0) {\n writer.uint32(256).int32(message.positionRightUnit);\n }\n if (message.positionRight !== 0) {\n writer.uint32(269).float(message.positionRight);\n }\n if (message.positionBottomUnit !== 0) {\n writer.uint32(272).int32(message.positionBottomUnit);\n }\n if (message.positionBottom !== 0) {\n writer.uint32(285).float(message.positionBottom);\n }\n if (message.marginLeftUnit !== 0) {\n writer.uint32(288).int32(message.marginLeftUnit);\n }\n if (message.marginLeft !== 0) {\n writer.uint32(301).float(message.marginLeft);\n }\n if (message.marginTopUnit !== 0) {\n writer.uint32(304).int32(message.marginTopUnit);\n }\n if (message.marginTop !== 0) {\n writer.uint32(317).float(message.marginTop);\n }\n if (message.marginRightUnit !== 0) {\n writer.uint32(320).int32(message.marginRightUnit);\n }\n if (message.marginRight !== 0) {\n writer.uint32(333).float(message.marginRight);\n }\n if (message.marginBottomUnit !== 0) {\n writer.uint32(336).int32(message.marginBottomUnit);\n }\n if (message.marginBottom !== 0) {\n writer.uint32(349).float(message.marginBottom);\n }\n if (message.paddingLeftUnit !== 0) {\n writer.uint32(352).int32(message.paddingLeftUnit);\n }\n if (message.paddingLeft !== 0) {\n writer.uint32(365).float(message.paddingLeft);\n }\n if (message.paddingTopUnit !== 0) {\n writer.uint32(368).int32(message.paddingTopUnit);\n }\n if (message.paddingTop !== 0) {\n writer.uint32(381).float(message.paddingTop);\n }\n if (message.paddingRightUnit !== 0) {\n writer.uint32(384).int32(message.paddingRightUnit);\n }\n if (message.paddingRight !== 0) {\n writer.uint32(397).float(message.paddingRight);\n }\n if (message.paddingBottomUnit !== 0) {\n writer.uint32(400).int32(message.paddingBottomUnit);\n }\n if (message.paddingBottom !== 0) {\n writer.uint32(413).float(message.paddingBottom);\n }\n if (message.pointerFilter !== undefined) {\n writer.uint32(416).int32(message.pointerFilter);\n }\n return writer;\n }\n PBUiTransform.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiTransform();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.parent = reader.int32();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.rightOf = reader.int32();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.alignContent = reader.int32();\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.alignItems = reader.int32();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.flexWrap = reader.int32();\n continue;\n case 6:\n if (tag !== 53) {\n break;\n }\n message.flexShrink = reader.float();\n continue;\n case 7:\n if (tag !== 56) {\n break;\n }\n message.positionType = reader.int32();\n continue;\n case 8:\n if (tag !== 64) {\n break;\n }\n message.alignSelf = reader.int32();\n continue;\n case 9:\n if (tag !== 72) {\n break;\n }\n message.flexDirection = reader.int32();\n continue;\n case 10:\n if (tag !== 80) {\n break;\n }\n message.justifyContent = reader.int32();\n continue;\n case 11:\n if (tag !== 88) {\n break;\n }\n message.overflow = reader.int32();\n continue;\n case 12:\n if (tag !== 96) {\n break;\n }\n message.display = reader.int32();\n continue;\n case 13:\n if (tag !== 104) {\n break;\n }\n message.flexBasisUnit = reader.int32();\n continue;\n case 14:\n if (tag !== 117) {\n break;\n }\n message.flexBasis = reader.float();\n continue;\n case 15:\n if (tag !== 125) {\n break;\n }\n message.flexGrow = reader.float();\n continue;\n case 16:\n if (tag !== 128) {\n break;\n }\n message.widthUnit = reader.int32();\n continue;\n case 17:\n if (tag !== 141) {\n break;\n }\n message.width = reader.float();\n continue;\n case 18:\n if (tag !== 144) {\n break;\n }\n message.heightUnit = reader.int32();\n continue;\n case 19:\n if (tag !== 157) {\n break;\n }\n message.height = reader.float();\n continue;\n case 20:\n if (tag !== 160) {\n break;\n }\n message.minWidthUnit = reader.int32();\n continue;\n case 21:\n if (tag !== 173) {\n break;\n }\n message.minWidth = reader.float();\n continue;\n case 22:\n if (tag !== 176) {\n break;\n }\n message.minHeightUnit = reader.int32();\n continue;\n case 23:\n if (tag !== 189) {\n break;\n }\n message.minHeight = reader.float();\n continue;\n case 24:\n if (tag !== 192) {\n break;\n }\n message.maxWidthUnit = reader.int32();\n continue;\n case 25:\n if (tag !== 205) {\n break;\n }\n message.maxWidth = reader.float();\n continue;\n case 26:\n if (tag !== 208) {\n break;\n }\n message.maxHeightUnit = reader.int32();\n continue;\n case 27:\n if (tag !== 221) {\n break;\n }\n message.maxHeight = reader.float();\n continue;\n case 28:\n if (tag !== 224) {\n break;\n }\n message.positionLeftUnit = reader.int32();\n continue;\n case 29:\n if (tag !== 237) {\n break;\n }\n message.positionLeft = reader.float();\n continue;\n case 30:\n if (tag !== 240) {\n break;\n }\n message.positionTopUnit = reader.int32();\n continue;\n case 31:\n if (tag !== 253) {\n break;\n }\n message.positionTop = reader.float();\n continue;\n case 32:\n if (tag !== 256) {\n break;\n }\n message.positionRightUnit = reader.int32();\n continue;\n case 33:\n if (tag !== 269) {\n break;\n }\n message.positionRight = reader.float();\n continue;\n case 34:\n if (tag !== 272) {\n break;\n }\n message.positionBottomUnit = reader.int32();\n continue;\n case 35:\n if (tag !== 285) {\n break;\n }\n message.positionBottom = reader.float();\n continue;\n case 36:\n if (tag !== 288) {\n break;\n }\n message.marginLeftUnit = reader.int32();\n continue;\n case 37:\n if (tag !== 301) {\n break;\n }\n message.marginLeft = reader.float();\n continue;\n case 38:\n if (tag !== 304) {\n break;\n }\n message.marginTopUnit = reader.int32();\n continue;\n case 39:\n if (tag !== 317) {\n break;\n }\n message.marginTop = reader.float();\n continue;\n case 40:\n if (tag !== 320) {\n break;\n }\n message.marginRightUnit = reader.int32();\n continue;\n case 41:\n if (tag !== 333) {\n break;\n }\n message.marginRight = reader.float();\n continue;\n case 42:\n if (tag !== 336) {\n break;\n }\n message.marginBottomUnit = reader.int32();\n continue;\n case 43:\n if (tag !== 349) {\n break;\n }\n message.marginBottom = reader.float();\n continue;\n case 44:\n if (tag !== 352) {\n break;\n }\n message.paddingLeftUnit = reader.int32();\n continue;\n case 45:\n if (tag !== 365) {\n break;\n }\n message.paddingLeft = reader.float();\n continue;\n case 46:\n if (tag !== 368) {\n break;\n }\n message.paddingTopUnit = reader.int32();\n continue;\n case 47:\n if (tag !== 381) {\n break;\n }\n message.paddingTop = reader.float();\n continue;\n case 48:\n if (tag !== 384) {\n break;\n }\n message.paddingRightUnit = reader.int32();\n continue;\n case 49:\n if (tag !== 397) {\n break;\n }\n message.paddingRight = reader.float();\n continue;\n case 50:\n if (tag !== 400) {\n break;\n }\n message.paddingBottomUnit = reader.int32();\n continue;\n case 51:\n if (tag !== 413) {\n break;\n }\n message.paddingBottom = reader.float();\n continue;\n case 52:\n if (tag !== 416) {\n break;\n }\n message.pointerFilter = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiTransform.decode = decode;\n})(PBUiTransform || (PBUiTransform = {}));\n", "import { PBUiTransform } from './pb/decentraland/sdk/components/ui_transform.gen';\n/**\n * @internal\n */\nexport const UiTransformSchema = {\n COMPONENT_ID: 1050,\n serialize(value, builder) {\n const writer = PBUiTransform.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiTransform.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiTransform.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiTransform\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var VideoState;\n(function (VideoState) {\n VideoState[VideoState[\"VS_NONE\"] = 0] = \"VS_NONE\";\n VideoState[VideoState[\"VS_ERROR\"] = 1] = \"VS_ERROR\";\n VideoState[VideoState[\"VS_LOADING\"] = 2] = \"VS_LOADING\";\n VideoState[VideoState[\"VS_READY\"] = 3] = \"VS_READY\";\n VideoState[VideoState[\"VS_PLAYING\"] = 4] = \"VS_PLAYING\";\n VideoState[VideoState[\"VS_BUFFERING\"] = 5] = \"VS_BUFFERING\";\n VideoState[VideoState[\"VS_SEEKING\"] = 6] = \"VS_SEEKING\";\n VideoState[VideoState[\"VS_PAUSED\"] = 7] = \"VS_PAUSED\";\n})(VideoState || (VideoState = {}));\nfunction createBasePBVideoEvent() {\n return { timestamp: 0, tickNumber: 0, currentOffset: 0, videoLength: 0, state: 0 };\n}\n/**\n * @public\n */\nexport var PBVideoEvent;\n(function (PBVideoEvent) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.timestamp !== 0) {\n writer.uint32(8).uint32(message.timestamp);\n }\n if (message.tickNumber !== 0) {\n writer.uint32(16).uint32(message.tickNumber);\n }\n if (message.currentOffset !== 0) {\n writer.uint32(29).float(message.currentOffset);\n }\n if (message.videoLength !== 0) {\n writer.uint32(37).float(message.videoLength);\n }\n if (message.state !== 0) {\n writer.uint32(40).int32(message.state);\n }\n return writer;\n }\n PBVideoEvent.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBVideoEvent();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.timestamp = reader.uint32();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.tickNumber = reader.uint32();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.currentOffset = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.videoLength = reader.float();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.state = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBVideoEvent.decode = decode;\n})(PBVideoEvent || (PBVideoEvent = {}));\n", "import { PBVideoEvent } from './pb/decentraland/sdk/components/video_event.gen';\n/**\n * @internal\n */\nexport const VideoEventSchema = {\n COMPONENT_ID: 1044,\n serialize(value, builder) {\n const writer = PBVideoEvent.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBVideoEvent.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBVideoEvent.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBVideoEvent\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBVideoPlayer() {\n return {\n src: \"\",\n playing: undefined,\n position: undefined,\n volume: undefined,\n playbackRate: undefined,\n loop: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBVideoPlayer;\n(function (PBVideoPlayer) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.src !== \"\") {\n writer.uint32(10).string(message.src);\n }\n if (message.playing !== undefined) {\n writer.uint32(16).bool(message.playing);\n }\n if (message.position !== undefined) {\n writer.uint32(29).float(message.position);\n }\n if (message.volume !== undefined) {\n writer.uint32(37).float(message.volume);\n }\n if (message.playbackRate !== undefined) {\n writer.uint32(45).float(message.playbackRate);\n }\n if (message.loop !== undefined) {\n writer.uint32(48).bool(message.loop);\n }\n return writer;\n }\n PBVideoPlayer.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBVideoPlayer();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.src = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.playing = reader.bool();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.position = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.volume = reader.float();\n continue;\n case 5:\n if (tag !== 45) {\n break;\n }\n message.playbackRate = reader.float();\n continue;\n case 6:\n if (tag !== 48) {\n break;\n }\n message.loop = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBVideoPlayer.decode = decode;\n})(PBVideoPlayer || (PBVideoPlayer = {}));\n", "import { PBVideoPlayer } from './pb/decentraland/sdk/components/video_player.gen';\n/**\n * @internal\n */\nexport const VideoPlayerSchema = {\n COMPONENT_ID: 1043,\n serialize(value, builder) {\n const writer = PBVideoPlayer.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBVideoPlayer.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBVideoPlayer.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBVideoPlayer\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBVisibilityComponent() {\n return { visible: undefined };\n}\n/**\n * @public\n */\nexport var PBVisibilityComponent;\n(function (PBVisibilityComponent) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.visible !== undefined) {\n writer.uint32(8).bool(message.visible);\n }\n return writer;\n }\n PBVisibilityComponent.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBVisibilityComponent();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.visible = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBVisibilityComponent.decode = decode;\n})(PBVisibilityComponent || (PBVisibilityComponent = {}));\n", "import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibility_component.gen';\n/**\n * @internal\n */\nexport const VisibilityComponentSchema = {\n COMPONENT_ID: 1081,\n serialize(value, builder) {\n const writer = PBVisibilityComponent.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBVisibilityComponent.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBVisibilityComponent.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBVisibilityComponent\"\n }\n};\n", "import { AnimatorSchema } from './Animator.gen';\nimport { AudioSourceSchema } from './AudioSource.gen';\nimport { AudioStreamSchema } from './AudioStream.gen';\nimport { AvatarAttachSchema } from './AvatarAttach.gen';\nimport { AvatarModifierAreaSchema } from './AvatarModifierArea.gen';\nimport { AvatarShapeSchema } from './AvatarShape.gen';\nimport { BillboardSchema } from './Billboard.gen';\nimport { CameraModeSchema } from './CameraMode.gen';\nimport { CameraModeAreaSchema } from './CameraModeArea.gen';\nimport { EngineInfoSchema } from './EngineInfo.gen';\nimport { GltfContainerSchema } from './GltfContainer.gen';\nimport { GltfContainerLoadingStateSchema } from './GltfContainerLoadingState.gen';\nimport { MaterialSchema } from './Material.gen';\nimport { MeshColliderSchema } from './MeshCollider.gen';\nimport { MeshRendererSchema } from './MeshRenderer.gen';\nimport { NftShapeSchema } from './NftShape.gen';\nimport { PointerEventsSchema } from './PointerEvents.gen';\nimport { PointerEventsResultSchema } from './PointerEventsResult.gen';\nimport { PointerLockSchema } from './PointerLock.gen';\nimport { RaycastSchema } from './Raycast.gen';\nimport { RaycastResultSchema } from './RaycastResult.gen';\nimport { TextShapeSchema } from './TextShape.gen';\nimport { TweenSchema } from './Tween.gen';\nimport { TweenSequenceSchema } from './TweenSequence.gen';\nimport { TweenStateSchema } from './TweenState.gen';\nimport { UiBackgroundSchema } from './UiBackground.gen';\nimport { UiCanvasInformationSchema } from './UiCanvasInformation.gen';\nimport { UiDropdownSchema } from './UiDropdown.gen';\nimport { UiDropdownResultSchema } from './UiDropdownResult.gen';\nimport { UiInputSchema } from './UiInput.gen';\nimport { UiInputResultSchema } from './UiInputResult.gen';\nimport { UiTextSchema } from './UiText.gen';\nimport { UiTransformSchema } from './UiTransform.gen';\nimport { VideoEventSchema } from './VideoEvent.gen';\nimport { VideoPlayerSchema } from './VideoPlayer.gen';\nimport { VisibilityComponentSchema } from './VisibilityComponent.gen';\nexport * from './pb/decentraland/sdk/components/animator.gen';\nexport * from './pb/decentraland/sdk/components/audio_source.gen';\nexport * from './pb/decentraland/sdk/components/audio_stream.gen';\nexport * from './pb/decentraland/sdk/components/avatar_attach.gen';\nexport * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';\nexport * from './pb/decentraland/sdk/components/avatar_shape.gen';\nexport * from './pb/decentraland/sdk/components/billboard.gen';\nexport * from './pb/decentraland/sdk/components/camera_mode.gen';\nexport * from './pb/decentraland/sdk/components/camera_mode_area.gen';\nexport * from './pb/decentraland/sdk/components/engine_info.gen';\nexport * from './pb/decentraland/sdk/components/gltf_container.gen';\nexport * from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';\nexport * from './pb/decentraland/sdk/components/material.gen';\nexport * from './pb/decentraland/sdk/components/mesh_collider.gen';\nexport * from './pb/decentraland/sdk/components/mesh_renderer.gen';\nexport * from './pb/decentraland/sdk/components/nft_shape.gen';\nexport * from './pb/decentraland/sdk/components/pointer_events.gen';\nexport * from './pb/decentraland/sdk/components/pointer_events_result.gen';\nexport * from './pb/decentraland/sdk/components/pointer_lock.gen';\nexport * from './pb/decentraland/sdk/components/raycast.gen';\nexport * from './pb/decentraland/sdk/components/raycast_result.gen';\nexport * from './pb/decentraland/sdk/components/text_shape.gen';\nexport * from './pb/decentraland/sdk/components/tween.gen';\nexport * from './pb/decentraland/sdk/components/tween_sequence.gen';\nexport * from './pb/decentraland/sdk/components/tween_state.gen';\nexport * from './pb/decentraland/sdk/components/ui_background.gen';\nexport * from './pb/decentraland/sdk/components/ui_canvas_information.gen';\nexport * from './pb/decentraland/sdk/components/ui_dropdown.gen';\nexport * from './pb/decentraland/sdk/components/ui_dropdown_result.gen';\nexport * from './pb/decentraland/sdk/components/ui_input.gen';\nexport * from './pb/decentraland/sdk/components/ui_input_result.gen';\nexport * from './pb/decentraland/sdk/components/ui_text.gen';\nexport * from './pb/decentraland/sdk/components/ui_transform.gen';\nexport * from './pb/decentraland/sdk/components/video_event.gen';\nexport * from './pb/decentraland/sdk/components/video_player.gen';\nexport * from './pb/decentraland/sdk/components/visibility_component.gen';\n/** @public */ export const Animator = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::Animator\", AnimatorSchema);\n/** @public */ export const AudioSource = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::AudioSource\", AudioSourceSchema);\n/** @public */ export const AudioStream = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::AudioStream\", AudioStreamSchema);\n/** @public */ export const AvatarAttach = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::AvatarAttach\", AvatarAttachSchema);\n/** @public */ export const AvatarModifierArea = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::AvatarModifierArea\", AvatarModifierAreaSchema);\n/** @public */ export const AvatarShape = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::AvatarShape\", AvatarShapeSchema);\n/** @public */ export const Billboard = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::Billboard\", BillboardSchema);\n/** @public */ export const CameraMode = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::CameraMode\", CameraModeSchema);\n/** @public */ export const CameraModeArea = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::CameraModeArea\", CameraModeAreaSchema);\n/** @public */ export const EngineInfo = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::EngineInfo\", EngineInfoSchema);\n/** @public */ export const GltfContainer = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::GltfContainer\", GltfContainerSchema);\n/** @public */ export const GltfContainerLoadingState = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::GltfContainerLoadingState\", GltfContainerLoadingStateSchema);\n/** @public */ export const Material = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::Material\", MaterialSchema);\n/** @public */ export const MeshCollider = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::MeshCollider\", MeshColliderSchema);\n/** @public */ export const MeshRenderer = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::MeshRenderer\", MeshRendererSchema);\n/** @public */ export const NftShape = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::NftShape\", NftShapeSchema);\n/** @public */ export const PointerEvents = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::PointerEvents\", PointerEventsSchema);\n/** @public */ export const PointerEventsResult = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema(\"core::PointerEventsResult\", PointerEventsResultSchema, {\n timestampFunction: (t) => t.timestamp,\n maxElements: 100\n});\n/** @public */ export const PointerLock = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::PointerLock\", PointerLockSchema);\n/** @public */ export const Raycast = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::Raycast\", RaycastSchema);\n/** @public */ export const RaycastResult = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::RaycastResult\", RaycastResultSchema);\n/** @public */ export const TextShape = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::TextShape\", TextShapeSchema);\n/** @public */ export const Tween = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::Tween\", TweenSchema);\n/** @public */ export const TweenSequence = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::TweenSequence\", TweenSequenceSchema);\n/** @public */ export const TweenState = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::TweenState\", TweenStateSchema);\n/** @public */ export const UiBackground = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiBackground\", UiBackgroundSchema);\n/** @public */ export const UiCanvasInformation = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiCanvasInformation\", UiCanvasInformationSchema);\n/** @public */ export const UiDropdown = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiDropdown\", UiDropdownSchema);\n/** @public */ export const UiDropdownResult = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiDropdownResult\", UiDropdownResultSchema);\n/** @public */ export const UiInput = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiInput\", UiInputSchema);\n/** @public */ export const UiInputResult = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiInputResult\", UiInputResultSchema);\n/** @public */ export const UiText = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiText\", UiTextSchema);\n/** @public */ export const UiTransform = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiTransform\", UiTransformSchema);\n/** @public */ export const VideoEvent = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema(\"core::VideoEvent\", VideoEventSchema, {\n timestampFunction: (t) => t.timestamp,\n maxElements: 100\n});\n/** @public */ export const VideoPlayer = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::VideoPlayer\", VideoPlayerSchema);\n/** @public */ export const VisibilityComponent = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::VisibilityComponent\", VisibilityComponentSchema);\n/** public */\nexport const componentDefinitionByName = /* @__PURE__ */ {\n \"core::Animator\": Animator,\n \"core::AudioSource\": AudioSource,\n \"core::AudioStream\": AudioStream,\n \"core::AvatarAttach\": AvatarAttach,\n \"core::AvatarModifierArea\": AvatarModifierArea,\n \"core::AvatarShape\": AvatarShape,\n \"core::Billboard\": Billboard,\n \"core::CameraMode\": CameraMode,\n \"core::CameraModeArea\": CameraModeArea,\n \"core::EngineInfo\": EngineInfo,\n \"core::GltfContainer\": GltfContainer,\n \"core::GltfContainerLoadingState\": GltfContainerLoadingState,\n \"core::Material\": Material,\n \"core::MeshCollider\": MeshCollider,\n \"core::MeshRenderer\": MeshRenderer,\n \"core::NftShape\": NftShape,\n \"core::PointerEvents\": PointerEvents,\n \"core::PointerEventsResult\": PointerEventsResult,\n \"core::PointerLock\": PointerLock,\n \"core::Raycast\": Raycast,\n \"core::RaycastResult\": RaycastResult,\n \"core::TextShape\": TextShape,\n \"core::Tween\": Tween,\n \"core::TweenSequence\": TweenSequence,\n \"core::TweenState\": TweenState,\n \"core::UiBackground\": UiBackground,\n \"core::UiCanvasInformation\": UiCanvasInformation,\n \"core::UiDropdown\": UiDropdown,\n \"core::UiDropdownResult\": UiDropdownResult,\n \"core::UiInput\": UiInput,\n \"core::UiInputResult\": UiInputResult,\n \"core::UiText\": UiText,\n \"core::UiTransform\": UiTransform,\n \"core::VideoEvent\": VideoEvent,\n \"core::VideoPlayer\": VideoPlayer,\n \"core::VisibilityComponent\": VisibilityComponent,\n};\n", "import { Animator } from '../generated/index.gen';\nexport function defineAnimatorComponent(engine) {\n const theComponent = Animator(engine);\n /**\n * @returns The tuple [animator, clip]\n */\n function getClipAndAnimator(entity, clipName) {\n const anim = theComponent.getMutableOrNull(entity);\n if (!anim)\n return [null, null];\n const state = anim.states.find((item) => item.clip === clipName);\n if (!state)\n return [anim, null];\n return [anim, state];\n }\n return {\n ...theComponent,\n getClipOrNull(entity, clipName) {\n const [_, state] = getClipAndAnimator(entity, clipName);\n return state;\n },\n getClip(entity, clipName) {\n const [animator, state] = getClipAndAnimator(entity, clipName);\n if (!animator) {\n throw new Error(`There is no Animator found in the entity ${entity}`);\n }\n if (!state) {\n throw new Error(`The Animator component of ${entity} has no the state ${clipName}`);\n }\n return state;\n },\n playSingleAnimation(entity, clipName, shouldReset = true) {\n const [animator, state] = getClipAndAnimator(entity, clipName);\n if (!animator || !state)\n return false;\n // Reset all other animations\n for (const state of animator.states) {\n state.playing = false;\n state.shouldReset = true;\n }\n state.playing = true;\n state.shouldReset = shouldReset;\n return true;\n },\n stopAllAnimations(entity, resetCursor = true) {\n // Get the mutable to modifying\n const animator = theComponent.getMutableOrNull(entity);\n if (!animator)\n return false;\n // Reset all other animations\n for (const state of animator.states) {\n state.playing = false;\n state.shouldReset = resetCursor;\n }\n return true;\n }\n };\n}\n", "import { MeshCollider } from '../generated/index.gen';\nexport function defineMeshColliderComponent(engine) {\n const theComponent = MeshCollider(engine);\n function getCollisionMask(layers) {\n if (Array.isArray(layers)) {\n return layers.map((item) => item).reduce((prev, item) => prev | item, 0);\n }\n else if (layers) {\n return layers;\n }\n }\n return {\n ...theComponent,\n setBox(entity, colliderLayers) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'box', box: {} },\n collisionMask: getCollisionMask(colliderLayers)\n });\n },\n setPlane(entity, colliderLayers) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'plane', plane: {} },\n collisionMask: getCollisionMask(colliderLayers)\n });\n },\n setCylinder(entity, radiusBottom, radiusTop, colliderLayers) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'cylinder', cylinder: { radiusBottom, radiusTop } },\n collisionMask: getCollisionMask(colliderLayers)\n });\n },\n setSphere(entity, colliderLayers) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'sphere', sphere: {} },\n collisionMask: getCollisionMask(colliderLayers)\n });\n }\n };\n}\n", "import { Tween } from '../generated/index.gen';\nconst TweenHelper = {\n Move(move) {\n return {\n $case: 'move',\n move\n };\n },\n Rotate(rotate) {\n return {\n $case: 'rotate',\n rotate\n };\n },\n Scale(scale) {\n return {\n $case: 'scale',\n scale\n };\n }\n};\nexport function defineTweenComponent(engine) {\n const theComponent = Tween(engine);\n return {\n ...theComponent,\n Mode: TweenHelper\n };\n}\n", "/**\n * @internal\n */\nexport const IArray = (type) => {\n return {\n serialize(value, builder) {\n builder.writeUint32(value.length);\n for (const item of value) {\n type.serialize(item, builder);\n }\n },\n deserialize(reader) {\n const newArray = [];\n const length = reader.readUint32();\n for (let index = 0; index < length; index++) {\n newArray.push(type.deserialize(reader));\n }\n return newArray;\n },\n create() {\n return [];\n },\n jsonSchema: {\n type: 'array',\n items: type.jsonSchema,\n serializationType: 'array'\n }\n };\n};\n", "/**\n * @internal\n */\nexport const Bool = {\n serialize(value, builder) {\n builder.writeInt8(value ? 1 : 0);\n },\n deserialize(reader) {\n return reader.readInt8() === 1;\n },\n create() {\n return false;\n },\n jsonSchema: {\n type: 'boolean',\n serializationType: 'boolean'\n }\n};\n", "/**\n * @internal\n */\nexport const Int64 = {\n serialize(value, builder) {\n builder.writeInt64(BigInt(value));\n },\n deserialize(reader) {\n return Number(reader.readInt64());\n },\n create() {\n return 0;\n },\n jsonSchema: {\n type: 'integer',\n serializationType: 'int64'\n }\n};\n/**\n * @internal\n */\nexport const Int32 = {\n serialize(value, builder) {\n builder.writeInt32(value);\n },\n deserialize(reader) {\n return reader.readInt32();\n },\n create() {\n return 0;\n },\n jsonSchema: {\n type: 'integer',\n serializationType: 'int32'\n }\n};\n/**\n * @public\n */\nexport const Int16 = {\n serialize(value, builder) {\n builder.writeInt16(value);\n },\n deserialize(reader) {\n return reader.readInt16();\n },\n create() {\n return 0;\n },\n jsonSchema: {\n type: 'integer',\n serializationType: 'int16'\n }\n};\n/**\n * @public\n */\nexport const Int8 = {\n serialize(value, builder) {\n builder.writeInt8(value);\n },\n deserialize(reader) {\n return reader.readInt8();\n },\n create() {\n return 0;\n },\n jsonSchema: {\n type: 'integer',\n serializationType: 'int8'\n }\n};\n", "/**\n * @internal\n */\nexport const FlatString = {\n serialize(value, builder) {\n builder.writeUtf8String(value);\n },\n deserialize(reader) {\n return reader.readUtf8String();\n },\n create() {\n return '';\n },\n jsonSchema: {\n type: 'string',\n serializationType: 'utf8-string'\n }\n};\n/**\n * @internal\n */\nexport const EcsString = FlatString;\n", "import { Int32 } from './Integer';\nimport { FlatString } from './String';\n/**\n * Validates the enum to ensure all member values are numbers and within the range of Int32.\n * @param enumValue The enum to be checked.\n * @throws If any member value is not a number or is outside the range of Int32.\n */\nfunction validateMemberValuesAreNumbersAndInRangeInt32(enumValue) {\n const MIN_VALUE = -(2 ** 31), MAX_VALUE = 2 ** 31 - 1;\n let valueCount = 0, totalCount = 0;\n for (const key in enumValue) {\n if (typeof enumValue[key] === 'number') {\n if (enumValue[key] > MAX_VALUE || enumValue[key] < MIN_VALUE) {\n throw new Error(`Enum member values must be numbers within the range of ${MIN_VALUE} to ${MAX_VALUE}.`);\n }\n valueCount++;\n }\n totalCount++;\n }\n if (totalCount !== valueCount * 2) {\n throw new Error('All enum member values must be of numeric type.');\n }\n}\n/**\n * Validates the enum to ensure all member values are of string type.\n * @param enumValue The enum to be checked.\n * @throws If any member value is not of string type.\n */\nfunction validateMemberValuesAreStrings(enumValue) {\n for (const key in enumValue) {\n if (typeof enumValue[key] !== 'string') {\n throw new Error('All enum member values must be of string type.');\n }\n }\n}\n/**\n * @internal\n */\nexport const IntEnumReflectionType = 'enum-int';\n/**\n * @internal\n */\nexport const IntEnum = (enumObject, defaultValue) => {\n validateMemberValuesAreNumbersAndInRangeInt32(enumObject);\n return {\n serialize(value, builder) {\n Int32.serialize(value, builder);\n },\n deserialize(reader) {\n return Int32.deserialize(reader);\n },\n create() {\n return defaultValue;\n },\n jsonSchema: {\n // JSON-schema\n type: 'integer',\n enum: Object.values(enumObject).filter((item) => Number.isInteger(item)),\n default: defaultValue,\n // @dcl/ecs Schema Spec\n serializationType: IntEnumReflectionType,\n enumObject\n }\n };\n};\n/**\n * @internal\n */\nexport const StringEnumReflectionType = 'enum-string';\n/**\n * @internal\n */\nexport const StringEnum = (enumObject, defaultValue) => {\n validateMemberValuesAreStrings(enumObject);\n // String enum has the exact mapping from key (our reference in code) to values\n return {\n serialize(value, builder) {\n FlatString.serialize(value, builder);\n },\n deserialize(reader) {\n return FlatString.deserialize(reader);\n },\n create() {\n return defaultValue;\n },\n jsonSchema: {\n // JSON-schema\n type: 'string',\n enum: Object.values(enumObject),\n default: defaultValue,\n // @dcl/ecs Schema Spec\n serializationType: StringEnumReflectionType,\n enumObject\n }\n };\n};\n", "/**\n * @internal\n */\nexport const Float32 = {\n serialize(value, builder) {\n builder.writeFloat32(value);\n },\n deserialize(reader) {\n return reader.readFloat32();\n },\n create() {\n return 0.0;\n },\n jsonSchema: {\n type: 'number',\n serializationType: 'float32'\n }\n};\n/**\n * @internal\n */\nexport const Float64 = {\n serialize(value, builder) {\n builder.writeFloat64(value);\n },\n deserialize(reader) {\n return reader.readFloat64();\n },\n create() {\n return 0.0;\n },\n jsonSchema: {\n type: 'number',\n serializationType: 'float64'\n }\n};\n", "/**\n * @internal\n */\nexport const Color3Schema = {\n serialize(value, builder) {\n builder.writeFloat32(value.r);\n builder.writeFloat32(value.g);\n builder.writeFloat32(value.b);\n },\n deserialize(reader) {\n return {\n r: reader.readFloat32(),\n g: reader.readFloat32(),\n b: reader.readFloat32()\n };\n },\n create() {\n return { r: 0, g: 0, b: 0 };\n },\n jsonSchema: {\n type: 'object',\n properties: {\n r: { type: 'number' },\n g: { type: 'number' },\n b: { type: 'number' }\n },\n serializationType: 'color3'\n }\n};\n", "/**\n * @internal\n */\nexport const Color4Schema = {\n serialize(value, builder) {\n builder.writeFloat32(value.r);\n builder.writeFloat32(value.g);\n builder.writeFloat32(value.b);\n builder.writeFloat32(value.a);\n },\n deserialize(reader) {\n return {\n r: reader.readFloat32(),\n g: reader.readFloat32(),\n b: reader.readFloat32(),\n a: reader.readFloat32()\n };\n },\n create() {\n return { r: 0, g: 0, b: 0, a: 0 };\n },\n jsonSchema: {\n type: 'object',\n properties: {\n r: { type: 'number' },\n g: { type: 'number' },\n b: { type: 'number' },\n a: { type: 'number' }\n },\n serializationType: 'color4'\n }\n};\n", "/**\n * @internal\n */\nexport const EntitySchema = {\n serialize(value, builder) {\n builder.writeInt32(value);\n },\n deserialize(reader) {\n return reader.readInt32();\n },\n create() {\n return 0;\n },\n jsonSchema: {\n type: 'integer',\n serializationType: 'entity'\n }\n};\n", "/**\n * @internal\n */\nexport const QuaternionSchema = {\n serialize(value, builder) {\n builder.writeFloat32(value.x);\n builder.writeFloat32(value.y);\n builder.writeFloat32(value.z);\n builder.writeFloat32(value.w);\n },\n deserialize(reader) {\n return {\n x: reader.readFloat32(),\n y: reader.readFloat32(),\n z: reader.readFloat32(),\n w: reader.readFloat32()\n };\n },\n create() {\n return { x: 0, y: 0, z: 0, w: 0 };\n },\n jsonSchema: {\n type: 'object',\n properties: {\n x: { type: 'number' },\n y: { type: 'number' },\n z: { type: 'number' },\n w: { type: 'number' }\n },\n serializationType: 'quaternion'\n }\n};\n", "/**\n * @internal\n */\nexport const Vector3Schema = {\n serialize(value, builder) {\n builder.writeFloat32(value.x);\n builder.writeFloat32(value.y);\n builder.writeFloat32(value.z);\n },\n deserialize(reader) {\n return {\n x: reader.readFloat32(),\n y: reader.readFloat32(),\n z: reader.readFloat32()\n };\n },\n create() {\n return { x: 0, y: 0, z: 0 };\n },\n jsonSchema: {\n type: 'object',\n properties: {\n x: { type: 'number' },\n y: { type: 'number' },\n z: { type: 'number' },\n w: { type: 'number' }\n },\n serializationType: 'vector3'\n }\n};\n", "/**\n * @internal\n */\nexport const IMap = (spec, defaultValue) => {\n const specReflection = Object.keys(spec).reduce((specReflection, currentKey) => {\n specReflection[currentKey] = spec[currentKey].jsonSchema;\n return specReflection;\n }, {});\n return {\n serialize(value, builder) {\n for (const key in spec) {\n spec[key].serialize(value[key], builder);\n }\n },\n deserialize(reader) {\n const newValue = {};\n for (const key in spec) {\n ;\n newValue[key] = spec[key].deserialize(reader);\n }\n return newValue;\n },\n create() {\n const newValue = {};\n for (const key in spec) {\n ;\n newValue[key] = spec[key].create();\n }\n return { ...newValue, ...defaultValue };\n },\n extend: (base) => {\n const newValue = {};\n for (const key in spec) {\n ;\n newValue[key] = spec[key].create();\n }\n return { ...newValue, ...defaultValue, ...base };\n },\n jsonSchema: {\n type: 'object',\n properties: specReflection,\n serializationType: 'map'\n }\n };\n};\n", "/**\n * @internal\n */\nexport const IOptional = (spec) => {\n return {\n serialize(value, builder) {\n if (value) {\n builder.writeInt8(1);\n spec.serialize(value, builder);\n }\n else {\n builder.writeInt8(0);\n }\n },\n deserialize(reader) {\n const exists = reader.readInt8();\n if (exists) {\n return spec.deserialize(reader);\n }\n },\n create() {\n return undefined;\n },\n jsonSchema: {\n type: spec.jsonSchema.type,\n serializationType: 'optional',\n optionalJsonSchema: spec.jsonSchema\n }\n };\n};\n", "export const IOneOf = (specs) => {\n const specKeys = Object.keys(specs);\n const keyToIndex = specKeys.reduce((dict, key, index) => {\n dict[key] = index;\n return dict;\n }, {});\n const specReflection = specKeys.reduce((specReflection, currentKey) => {\n specReflection[currentKey] = specs[currentKey].jsonSchema;\n return specReflection;\n }, {});\n return {\n serialize({ $case, value }, builder) {\n const _value = keyToIndex[$case.toString()] + 1;\n builder.writeUint8(_value);\n specs[$case].serialize(value, builder);\n },\n deserialize(reader) {\n const $case = specKeys[reader.readInt8() - 1];\n const value = specs[$case].deserialize(reader);\n return { $case, value };\n },\n create() {\n return {};\n },\n jsonSchema: {\n type: 'object',\n properties: specReflection,\n serializationType: 'one-of'\n }\n };\n};\n", "export const isSchemaType = (value, types) => types.includes(value.serializationType);\nexport const isOneOfJsonSchema = (type) => isSchemaType(type, ['one-of']);\nexport const getUnknownSchema = () => ({\n type: { type: 'object', serializationType: 'unknown' },\n value: undefined\n});\nexport const isCompoundType = (type) => isSchemaType(type, ['array', 'map']);\nexport const getTypeAndValue = (properties, value, key) => {\n const type = properties[key];\n const valueKey = value[key];\n if (isOneOfJsonSchema(type)) {\n const typedMapValue = valueKey;\n if (!typedMapValue.$case)\n return getUnknownSchema();\n const propType = type.properties[typedMapValue.$case];\n // transform { $case: string; value: unknown } => { [$case]: value }\n if (isCompoundType(propType))\n value[key] = { [typedMapValue.$case]: typedMapValue.value };\n return { type: propType, value: typedMapValue.value };\n }\n return { type, value: valueKey };\n};\n", "import { IArray } from '../Array';\nimport { Bool } from '../basic/Boolean';\nimport { IntEnum, StringEnum } from '../basic/Enum';\nimport { Float32, Float64 } from '../basic/Float';\nimport { Int16, Int32, Int64, Int8 } from '../basic/Integer';\nimport { EcsString } from '../basic/String';\nimport { Color3Schema } from '../custom/Color3';\nimport { Color4Schema } from '../custom/Color4';\nimport { EntitySchema } from '../custom/Entity';\nimport { QuaternionSchema } from '../custom/Quaternion';\nimport { Vector3Schema } from '../custom/Vector3';\nimport { IMap } from '../Map';\nimport { IOneOf } from '../OneOf';\nimport { IOptional } from '../Optional';\nimport { getTypeAndValue, isCompoundType } from './utils';\nconst primitiveSchemas = {\n [Bool.jsonSchema.serializationType]: Bool,\n [EcsString.jsonSchema.serializationType]: EcsString,\n [Float32.jsonSchema.serializationType]: Float32,\n [Float64.jsonSchema.serializationType]: Float64,\n [Int8.jsonSchema.serializationType]: Int8,\n [Int16.jsonSchema.serializationType]: Int16,\n [Int32.jsonSchema.serializationType]: Int32,\n [Int64.jsonSchema.serializationType]: Int64,\n [Vector3Schema.jsonSchema.serializationType]: Vector3Schema,\n [QuaternionSchema.jsonSchema.serializationType]: QuaternionSchema,\n [Color3Schema.jsonSchema.serializationType]: Color3Schema,\n [Color4Schema.jsonSchema.serializationType]: Color4Schema,\n [EntitySchema.jsonSchema.serializationType]: EntitySchema\n};\n/**\n * Create an ISchema object from the json-schema\n * @param jsonSchema\n * @returns a ISchema or fail for unsupported json-schema\n */\nexport function jsonSchemaToSchema(jsonSchema) {\n if (primitiveSchemas[jsonSchema.serializationType]) {\n return primitiveSchemas[jsonSchema.serializationType];\n }\n if (jsonSchema.serializationType === 'map') {\n const mapJsonSchema = jsonSchema;\n const spec = {};\n for (const key in mapJsonSchema.properties) {\n spec[key] = jsonSchemaToSchema(mapJsonSchema.properties[key]);\n }\n return IMap(spec);\n }\n if (jsonSchema.serializationType === 'optional') {\n const withItemsJsonSchema = jsonSchema;\n return IOptional(jsonSchemaToSchema(withItemsJsonSchema.optionalJsonSchema));\n }\n if (jsonSchema.serializationType === 'array') {\n const withItemsJsonSchema = jsonSchema;\n return IArray(jsonSchemaToSchema(withItemsJsonSchema.items));\n }\n if (jsonSchema.serializationType === 'enum-int') {\n const enumJsonSchema = jsonSchema;\n return IntEnum(enumJsonSchema.enumObject, enumJsonSchema.default);\n }\n if (jsonSchema.serializationType === 'enum-string') {\n const enumJsonSchema = jsonSchema;\n return StringEnum(enumJsonSchema.enumObject, enumJsonSchema.default);\n }\n if (jsonSchema.serializationType === 'one-of') {\n const oneOfJsonSchema = jsonSchema;\n const spec = {};\n for (const key in oneOfJsonSchema.properties) {\n spec[key] = jsonSchemaToSchema(oneOfJsonSchema.properties[key]);\n }\n return IOneOf(spec);\n }\n throw new Error(`${jsonSchema.serializationType} is not supported as reverse schema generation.`);\n}\nexport function mutateValues(jsonSchema, value, mutateFn) {\n if (jsonSchema.serializationType === 'map') {\n const { properties } = jsonSchema;\n const typedValue = value;\n for (const key in properties) {\n const { type, value: mapValue } = getTypeAndValue(properties, typedValue, key);\n if (type.serializationType === 'unknown')\n continue;\n if (isCompoundType(type)) {\n mutateValues(type, mapValue, mutateFn);\n }\n else {\n const newValue = mutateFn(mapValue, type);\n if (newValue.changed) {\n typedValue[key] = newValue.value;\n }\n }\n }\n }\n else if (jsonSchema.serializationType === 'array') {\n const { items } = jsonSchema;\n const arrayValue = value;\n for (let i = 0, n = arrayValue.length; i < n; i++) {\n const { type, value } = getTypeAndValue({ items: items }, { items: arrayValue[i] }, 'items');\n if (isCompoundType(type)) {\n mutateValues(type, value, mutateFn);\n }\n else {\n const newValue = mutateFn(value, type);\n if (newValue.changed) {\n arrayValue[i] = newValue.value;\n }\n }\n }\n }\n}\n", "import { IArray } from './Array';\nimport { Bool } from './basic/Boolean';\nimport { IntEnum as IntEnumSchema, StringEnum as StringEnumSchema } from './basic/Enum';\nimport { Float32, Float64 } from './basic/Float';\nimport { Int16, Int32, Int8, Int64 as iInt64 } from './basic/Integer';\nimport { EcsString } from './basic/String';\nimport { Color3Schema } from './custom/Color3';\nimport { Color4Schema } from './custom/Color4';\nimport { EntitySchema } from './custom/Entity';\nimport { QuaternionSchema } from './custom/Quaternion';\nimport { Vector3Schema } from './custom/Vector3';\nimport { IMap } from './Map';\nimport { IOptional } from './Optional';\nimport { IOneOf } from './OneOf';\nimport { jsonSchemaToSchema, mutateValues } from './buildSchema';\n/**\n * @public\n */\nexport var Schemas;\n(function (Schemas) {\n /** @public */\n Schemas.Boolean = Bool;\n /** @public */\n Schemas.String = EcsString;\n /** @public */\n Schemas.Float = Float32;\n /** @public */\n Schemas.Double = Float64;\n /** @public */\n Schemas.Byte = Int8;\n /** @public */\n Schemas.Short = Int16;\n /** @public */\n Schemas.Int = Int32;\n /** @public */\n Schemas.Int64 = iInt64;\n /** @public */\n Schemas.Number = Float32;\n /** @public */\n Schemas.Vector3 = Vector3Schema;\n /** @public */\n Schemas.Quaternion = QuaternionSchema;\n /** @public */\n Schemas.Color3 = Color3Schema;\n /** @public */\n Schemas.Color4 = Color4Schema;\n /** @public */\n Schemas.Entity = EntitySchema;\n /** @public */\n Schemas.EnumNumber = IntEnumSchema;\n /** @public */\n Schemas.EnumString = StringEnumSchema;\n /** @public */\n Schemas.Array = IArray;\n /** @public */\n Schemas.Map = IMap;\n /** @public */\n Schemas.Optional = IOptional;\n /** @public */\n Schemas.OneOf = IOneOf;\n /**\n * @public Create an ISchema object from the json-schema\n * @param jsonSchema\n * @returns a ISchema or fail for unsupported json-schema\n */\n Schemas.fromJson = jsonSchemaToSchema;\n /**\n * @public\n *\n * Traverses and mutates values in a JSON schema-based structure, applying the given mutation function to each value.\n * The function is designed to work with nested maps and arrays, recursively processing each element.\n *\n * @param jsonSchema - The JSON schema object that describes the structure of the value.\n * It must have a serializationType of 'map', 'array', or other custom types like 'entity'.\n * @param value - The value to be mutated, which should conform to the provided JSON schema.\n * @param mutateFn - A function that takes a value and its corresponding valueType (JsonSchemaExtended) as arguments\n * and returns a tuple [boolean, any]. The boolean indicates whether the mutation should be applied,\n * and the second element is the mutated value.\n */\n Schemas.mutateNestedValues = mutateValues;\n})(Schemas || (Schemas = {}));\n", "import { Schemas } from '../../schemas';\nfunction defineNameComponent(engine) {\n const Name = engine.defineComponent('core-schema::Name', {\n value: Schemas.String\n });\n return Name;\n}\nexport default defineNameComponent;\n", "import { Schemas } from '../../schemas';\nfunction defineSyncComponents(engine) {\n const SyncComponents = engine.defineComponent('core-schema::Sync-Components', {\n componentIds: Schemas.Array(Schemas.Int64)\n });\n return SyncComponents;\n}\nexport default defineSyncComponents;\n", "import { Schemas } from '../../schemas';\nfunction defineNetworkEntityComponent(engine) {\n const EntityNetwork = engine.defineComponent('core-schema::Entity-Network', {\n networkId: Schemas.Int64,\n entityId: Schemas.Entity\n });\n return EntityNetwork;\n}\nexport default defineNetworkEntityComponent;\n", "import { Schemas } from '../../schemas';\nfunction defineNetworkParentComponent(engine) {\n const EntityNetwork = engine.defineComponent('core-schema::Network-Parent', {\n networkId: Schemas.Int64,\n entityId: Schemas.Entity\n });\n return EntityNetwork;\n}\nexport default defineNetworkParentComponent;\n", "/**\n * @internal\n */\nexport const COMPONENT_ID = 1;\n/** @internal */\nexport const TRANSFORM_LENGTH = 44;\n/** @internal */\nexport const TransformSchema = {\n serialize(value, builder) {\n const ptr = builder.incrementWriteOffset(TRANSFORM_LENGTH);\n builder.setFloat32(ptr, value.position.x);\n builder.setFloat32(ptr + 4, value.position.y);\n builder.setFloat32(ptr + 8, value.position.z);\n builder.setFloat32(ptr + 12, value.rotation.x);\n builder.setFloat32(ptr + 16, value.rotation.y);\n builder.setFloat32(ptr + 20, value.rotation.z);\n builder.setFloat32(ptr + 24, value.rotation.w);\n builder.setFloat32(ptr + 28, value.scale.x);\n builder.setFloat32(ptr + 32, value.scale.y);\n builder.setFloat32(ptr + 36, value.scale.z);\n builder.setUint32(ptr + 40, value.parent || 0);\n },\n deserialize(reader) {\n const ptr = reader.incrementReadOffset(TRANSFORM_LENGTH);\n return {\n position: {\n x: reader.getFloat32(ptr),\n y: reader.getFloat32(ptr + 4),\n z: reader.getFloat32(ptr + 8)\n },\n rotation: {\n x: reader.getFloat32(ptr + 12),\n y: reader.getFloat32(ptr + 16),\n z: reader.getFloat32(ptr + 20),\n w: reader.getFloat32(ptr + 24)\n },\n scale: {\n x: reader.getFloat32(ptr + 28),\n y: reader.getFloat32(ptr + 32),\n z: reader.getFloat32(ptr + 36)\n },\n parent: reader.getUint32(ptr + 40)\n };\n },\n create() {\n return {\n position: { x: 0, y: 0, z: 0 },\n scale: { x: 1, y: 1, z: 1 },\n rotation: { x: 0, y: 0, z: 0, w: 1 },\n parent: 0\n };\n },\n extend(value) {\n return {\n position: { x: 0, y: 0, z: 0 },\n scale: { x: 1, y: 1, z: 1 },\n rotation: { x: 0, y: 0, z: 0, w: 1 },\n parent: 0,\n ...value\n };\n },\n jsonSchema: {\n type: 'object',\n properties: {\n position: {\n type: 'object',\n properties: {\n x: { type: 'number' },\n y: { type: 'number' },\n z: { type: 'number' }\n }\n },\n scale: {\n type: 'object',\n properties: {\n x: { type: 'number' },\n y: { type: 'number' },\n z: { type: 'number' }\n }\n },\n rotation: {\n type: 'object',\n properties: {\n x: { type: 'number' },\n y: { type: 'number' },\n z: { type: 'number' },\n w: { type: 'number' }\n }\n },\n parent: { type: 'integer' }\n },\n serializationType: 'transform'\n }\n};\nexport function defineTransformComponent(engine) {\n const transformDef = engine.defineComponentFromSchema('core::Transform', TransformSchema);\n return {\n ...transformDef,\n create(entity, val) {\n return transformDef.create(entity, TransformSchema.extend(val));\n },\n createOrReplace(entity, val) {\n return transformDef.createOrReplace(entity, TransformSchema.extend(val));\n }\n };\n}\n", "import { defineAnimatorComponent } from './extended/Animator';\nimport { defineMaterialComponent } from './extended/Material';\nimport { defineMeshColliderComponent } from './extended/MeshCollider';\nimport { defineMeshRendererComponent } from './extended/MeshRenderer';\nimport { defineTweenComponent } from './extended/Tween';\nimport defineNameComponent from './manual/Name';\nimport defineSyncComponent from './manual/SyncComponents';\nimport defineNetworkEntity from './manual/NetworkEntity';\nimport defineNetworkParent from './manual/NetworkParent';\nimport { defineTransformComponent } from './manual/Transform';\nexport * from './generated/index.gen';\n/* @__PURE__ */\nexport const Transform = (engine) => defineTransformComponent(engine);\n/* @__PURE__ */\nexport const Material = (engine) => defineMaterialComponent(engine);\n/* @__PURE__ */\nexport const Animator = (engine) => defineAnimatorComponent(engine);\n/* @__PURE__ */\nexport const MeshRenderer = (engine) => defineMeshRendererComponent(engine);\n/* @__PURE__ */\nexport const MeshCollider = (engine) => defineMeshColliderComponent(engine);\n/* @__PURE__ */\nexport const Tween = (engine) => defineTweenComponent(engine);\n/**\n * @alpha\n */\n/* @__PURE__ */\nexport const Name = (engine) => defineNameComponent(engine);\n/**\n * @alpha\n */\n/* @__PURE__ */\nexport const SyncComponents = (engine) => defineSyncComponent(engine);\n/**\n * @alpha\n */\n/* @__PURE__ */\nexport const NetworkEntity = (engine) => defineNetworkEntity(engine);\n/**\n * @alpha\n */\n/* @__PURE__ */\nexport const NetworkParent = (engine) => defineNetworkParent(engine);\n", "/**\n * Autogenerated mapping of core components to their component numbers\n */\nexport const coreComponentMappings = {\n \"core::Transform\": 1,\n \"core::Animator\": 1042,\n \"core::AudioSource\": 1020,\n \"core::AudioStream\": 1021,\n \"core::AvatarAttach\": 1073,\n \"core::AvatarBase\": 1087,\n \"core::AvatarEmoteCommand\": 1088,\n \"core::AvatarEquippedData\": 1091,\n \"core::AvatarModifierArea\": 1070,\n \"core::AvatarShape\": 1080,\n \"core::Billboard\": 1090,\n \"core::CameraMode\": 1072,\n \"core::CameraModeArea\": 1071,\n \"core::EngineInfo\": 1048,\n \"core::GltfContainer\": 1041,\n \"core::GltfContainerLoadingState\": 1049,\n \"core::Material\": 1017,\n \"core::MeshCollider\": 1019,\n \"core::MeshRenderer\": 1018,\n \"core::NftShape\": 1040,\n \"core::PlayerIdentityData\": 1089,\n \"core::PointerEvents\": 1062,\n \"core::PointerEventsResult\": 1063,\n \"core::PointerLock\": 1074,\n \"core::Raycast\": 1067,\n \"core::RaycastResult\": 1068,\n \"core::TextShape\": 1030,\n \"core::Tween\": 1102,\n \"core::TweenSequence\": 1104,\n \"core::TweenState\": 1103,\n \"core::UiBackground\": 1053,\n \"core::UiCanvasInformation\": 1054,\n \"core::UiDropdown\": 1094,\n \"core::UiDropdownResult\": 1096,\n \"core::UiInput\": 1093,\n \"core::UiInputResult\": 1095,\n \"core::UiText\": 1052,\n \"core::UiTransform\": 1050,\n \"core::VideoEvent\": 1044,\n \"core::VideoPlayer\": 1043,\n \"core::VisibilityComponent\": 1081\n};\n", "import { coreComponentMappings } from './generated/component-names.gen';\nimport * as utf8 from '@protobufjs/utf8';\nimport { unsignedCRC32 } from '../runtime/crc';\n// Max possible pre-defined (static) component.\nexport const MAX_STATIC_COMPONENT = 1 << 11; // 2048\n/**\n * All components that are not part of the coreComponentMappings MUST yield\n * a componentNumber (componentId) greather than MAX_STATIC_COMPONENT.\n * For that reason, we simply add MAX_STATIC_COMPONENT and trim to the domain 2^32\n */\nexport function componentNumberFromName(componentName) {\n if (coreComponentMappings[componentName])\n return coreComponentMappings[componentName];\n const bytes = new Uint8Array(128);\n utf8.write(componentName, bytes, 0);\n return ((unsignedCRC32(bytes) + MAX_STATIC_COMPONENT) & 4294967295) >>> 0;\n}\n", "const CRC_TABLE = new Int32Array([\n 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832,\n 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,\n 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a,\n 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,\n 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,\n 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,\n 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab,\n 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,\n 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4,\n 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,\n 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074,\n 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,\n 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525,\n 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,\n 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,\n 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,\n 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76,\n 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,\n 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6,\n 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,\n 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7,\n 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,\n 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7,\n 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,\n 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,\n 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,\n 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330,\n 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,\n 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d\n]);\nfunction _crc32(buf, previous) {\n let crc = ~~previous ^ -1;\n for (let n = 0; n < buf.length; n++) {\n crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8);\n }\n return crc ^ -1;\n}\nexport function unsignedCRC32(data, prev = 0) {\n return _crc32(data, prev) >>> 0;\n}\n", "/* istanbul ignore file */\nexport const __DEV__ = (typeof DEBUG === 'boolean' && DEBUG) ||\n (typeof process === 'object' &&\n (process.env?.NODE_ENV !== 'production' || process.env?.NODE_ENV === 'development')) ||\n false;\nexport function checkNotThenable(t, error) {\n if (__DEV__) {\n if (t && typeof t === 'object' && typeof t.then === 'function') {\n throw new Error(error);\n }\n }\n return t;\n}\n", "/**\n *\n * @returns a new GSet\n */\nexport function createVersionGSet() {\n const lastVersion = new Map();\n return {\n /**\n *\n * @param number\n * @param version\n * @returns\n */\n addTo(number, version) {\n /* istanbul ignore next */\n if (version < 0) {\n /* istanbul ignore next */\n return false;\n }\n const currentValue = lastVersion.get(number);\n // If the version is >=, it means the value it's already in the set\n if (currentValue !== undefined && currentValue >= version) {\n return true;\n }\n lastVersion.set(number, version);\n return true;\n },\n /**\n * @returns the set with [number, version] of each value\n */\n has(n, v) {\n const currentValue = lastVersion.get(n);\n // If the version is >=, it means the value it's already in the set\n if (currentValue !== undefined && currentValue >= v) {\n return true;\n }\n return false;\n },\n /**\n * Warning: this function returns the reference to the internal map,\n * if you need to mutate some value, make a copy.\n * For optimization purpose the copy isn't made here.\n *\n * @returns the map of number to version\n */\n getMap() {\n return lastVersion;\n }\n };\n}\n", "import { createVersionGSet } from '../systems/crdt/gset';\n/**\n * @internal\n */\nexport const MAX_U16 = 0xffff;\nconst MASK_UPPER_16_ON_32 = 0xffff0000;\n/**\n * @internal\n */\nexport const AMOUNT_VERSION_AVAILABLE = MAX_U16 + 1;\n// This type matches with @dcl/crdt entity type.\n/**\n * @internal\n */\nexport const MAX_ENTITY_NUMBER = MAX_U16;\n/**\n * This first 512 entities are reserved by the renderer\n */\nexport const RESERVED_STATIC_ENTITIES = 512;\n// Max amount of local entities that can be created\nexport const RESERVED_LOCAL_ENTITIES = MAX_ENTITY_NUMBER;\n/**\n * @public\n */\nexport var EntityUtils;\n(function (EntityUtils) {\n /**\n * @returns [entityNumber, entityVersion]\n */\n function fromEntityId(entityId) {\n return [(entityId & MAX_U16) >>> 0, (((entityId & MASK_UPPER_16_ON_32) >> 16) & MAX_U16) >>> 0];\n }\n EntityUtils.fromEntityId = fromEntityId;\n /**\n * @returns compound number from entityNumber and entityVerison\n */\n function toEntityId(entityNumber, entityVersion) {\n return (((entityNumber & MAX_U16) | ((entityVersion & MAX_U16) << 16)) >>> 0);\n }\n EntityUtils.toEntityId = toEntityId;\n})(EntityUtils || (EntityUtils = {}));\n/**\n * @public\n */\nexport var EntityState;\n(function (EntityState) {\n EntityState[EntityState[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * The entity was generated and added to the usedEntities set\n */\n EntityState[EntityState[\"UsedEntity\"] = 1] = \"UsedEntity\";\n /**\n * The entity was removed from current engine or remotely\n */\n EntityState[EntityState[\"Removed\"] = 2] = \"Removed\";\n /**\n * The entity is reserved number.\n */\n EntityState[EntityState[\"Reserved\"] = 3] = \"Reserved\";\n})(EntityState || (EntityState = {}));\n/**\n * @internal\n */\nexport function EntityContainer() {\n // Local entities counter\n let entityCounter = RESERVED_STATIC_ENTITIES;\n // Network entities counter\n let networkEntityCounter;\n // Network entities range that can be created by the user\n let networkedEntitiesRange;\n const usedEntities = new Set();\n let toRemoveEntities = [];\n const removedEntities = createVersionGSet();\n let localEntitiesAvailable = RESERVED_LOCAL_ENTITIES;\n function setNetworkEntitiesRange(reservedLocalEntities, range) {\n localEntitiesAvailable = reservedLocalEntities;\n networkedEntitiesRange = range;\n networkEntityCounter = range[0];\n }\n function generateNewEntity(networked) {\n if (entityCounter > MAX_ENTITY_NUMBER - 1) {\n throw new Error(`It fails trying to generate an entity out of range ${MAX_ENTITY_NUMBER}.`);\n }\n if (networked && networkEntityCounter > networkedEntitiesRange[1]) {\n throw new Error(`Max amount of network entities reached ${networkedEntitiesRange[1]} `);\n }\n if (!networked && entityCounter >= localEntitiesAvailable) {\n throw new Error(`Max amount of local entities reached ${localEntitiesAvailable}`);\n }\n const entityNumber = networked ? networkEntityCounter++ : entityCounter++;\n const entityVersion = removedEntities.getMap().has(entityNumber)\n ? removedEntities.getMap().get(entityNumber) + 1\n : 0;\n const entity = EntityUtils.toEntityId(entityNumber, entityVersion);\n if (usedEntities.has(entity)) {\n return generateNewEntity();\n }\n usedEntities.add(entity);\n return entity;\n }\n function generateEntity(networked) {\n if (networked && !networkedEntitiesRange) {\n throw new Error('Network entities ranged not initialized. Connect to a CRDT Server');\n }\n const usedNetworkSize = (networkedEntitiesRange &&\n [...usedEntities.values()].filter(($) => {\n const [entityId] = EntityUtils.fromEntityId($);\n return entityId >= networkedEntitiesRange[0] && entityId <= networkedEntitiesRange[1];\n }).length) ??\n 0;\n const usedSize = usedEntities.size - usedNetworkSize;\n // If all entities until `entityCounter` are being used, we need to generate another one\n if (!networked && usedSize + RESERVED_STATIC_ENTITIES >= entityCounter) {\n return generateNewEntity(networked);\n }\n // If all entities until `entityCounter` are being used, we need to generate another one\n if (networked && usedNetworkSize + networkedEntitiesRange[0] >= networkEntityCounter) {\n return generateNewEntity(networked);\n }\n for (const [number, version] of removedEntities.getMap()) {\n if (version < MAX_U16) {\n if (networked && (number < networkedEntitiesRange[0] || number > networkedEntitiesRange[1]))\n continue;\n if (!networked && number >= localEntitiesAvailable)\n continue;\n const entity = EntityUtils.toEntityId(number, version + 1);\n // If the entity is not being used, we can re-use it\n // If the entity was removed in this tick, we're not counting for the usedEntities, but we have it in the toRemoveEntityArray\n if (!usedEntities.has(entity) && !toRemoveEntities.includes(entity)) {\n usedEntities.add(entity);\n return entity;\n }\n }\n }\n return generateNewEntity(networked);\n }\n function removeEntity(entity) {\n if (entity < RESERVED_STATIC_ENTITIES)\n return false;\n if (usedEntities.has(entity)) {\n usedEntities.delete(entity);\n toRemoveEntities.push(entity);\n }\n else {\n updateRemovedEntity(entity);\n }\n return true;\n }\n function releaseRemovedEntities() {\n const arr = toRemoveEntities;\n if (arr.length) {\n toRemoveEntities = [];\n for (const entity of arr) {\n const [n, v] = EntityUtils.fromEntityId(entity);\n removedEntities.addTo(n, v);\n }\n }\n return arr;\n }\n function updateRemovedEntity(entity) {\n const [n, v] = EntityUtils.fromEntityId(entity);\n // Update the removed entities map\n removedEntities.addTo(n, v);\n // Remove the usedEntities if exist\n for (let i = 0; i <= v; i++) {\n usedEntities.delete(EntityUtils.toEntityId(n, i));\n }\n return true;\n }\n function updateUsedEntity(entity) {\n const [n, v] = EntityUtils.fromEntityId(entity);\n // if the entity was removed then abort fast\n if (removedEntities.has(n, v))\n return false;\n // Update\n if (v > 0) {\n for (let i = 0; i <= v - 1; i++) {\n usedEntities.delete(EntityUtils.toEntityId(n, i));\n }\n removedEntities.addTo(n, v - 1);\n }\n usedEntities.add(entity);\n return true;\n }\n function getEntityState(entity) {\n const [n, v] = EntityUtils.fromEntityId(entity);\n if (n < RESERVED_STATIC_ENTITIES) {\n return EntityState.Reserved;\n }\n if (usedEntities.has(entity)) {\n return EntityState.UsedEntity;\n }\n const removedVersion = removedEntities.getMap().get(n);\n if (removedVersion !== undefined && removedVersion >= v) {\n return EntityState.Removed;\n }\n return EntityState.Unknown;\n }\n return {\n setNetworkEntitiesRange,\n generateEntity,\n removeEntity,\n getExistingEntities() {\n return new Set(usedEntities);\n },\n getEntityState,\n releaseRemovedEntities,\n updateRemovedEntity,\n updateUsedEntity\n };\n}\n", "var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _ReadWriteByteBuffer_instances, _ReadWriteByteBuffer_woAdd, _ReadWriteByteBuffer_roAdd;\nimport * as utf8 from '@protobufjs/utf8';\n/**\n * Take the max between currentSize and intendedSize and then plus 1024. Then,\n * find the next nearer multiple of 1024.\n * @param currentSize - number\n * @param intendedSize - number\n * @returns the calculated number\n */\nfunction getNextSize(currentSize, intendedSize) {\n const minNewSize = Math.max(currentSize, intendedSize) + 1024;\n return Math.ceil(minNewSize / 1024) * 1024;\n}\nconst defaultInitialCapacity = 10240;\n/**\n * ByteBuffer is a wrapper of DataView which also adds a read and write offset.\n * Also in a write operation it resizes the buffer is being used if it needs.\n *\n * - Use read and write function to generate or consume data.\n * - Use set and get only if you are sure that you're doing.\n *\n * It always passes littleEndian param as true\n */\nexport class ReadWriteByteBuffer {\n /**\n * @param buffer - The initial buffer, provide a buffer if you need to set \"initial capacity\"\n * @param readingOffset - Set the cursor where begins to read. Default 0\n * @param writingOffset - Set the cursor to not start writing from the begin of it. Defaults to the buffer size\n */\n constructor(buffer, readingOffset, writingOffset) {\n _ReadWriteByteBuffer_instances.add(this);\n this._buffer = buffer || new Uint8Array(defaultInitialCapacity);\n this.view = new DataView(this._buffer.buffer, this._buffer.byteOffset);\n this.woffset = writingOffset ?? (buffer ? this._buffer.length : null) ?? 0;\n this.roffset = readingOffset ?? 0;\n }\n buffer() {\n return this._buffer;\n }\n bufferLength() {\n return this._buffer.length;\n }\n resetBuffer() {\n this.roffset = 0;\n this.woffset = 0;\n }\n currentReadOffset() {\n return this.roffset;\n }\n currentWriteOffset() {\n return this.woffset;\n }\n incrementReadOffset(amount) {\n return __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, amount);\n }\n remainingBytes() {\n return this.woffset - this.roffset;\n }\n readFloat32() {\n return this.view.getFloat32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true\n }\n readFloat64() {\n return this.view.getFloat64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 8), true); // littleEndian = true\n }\n readInt8() {\n return this.view.getInt8(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 1));\n }\n readInt16() {\n return this.view.getInt16(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 2), true); // littleEndian = true\n }\n readInt32() {\n return this.view.getInt32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true\n }\n readInt64() {\n return this.view.getBigInt64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 8), true); // littleEndian = true\n }\n readUint8() {\n return this.view.getUint8(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 1));\n }\n readUint16() {\n return this.view.getUint16(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 2), true); // littleEndian = true\n }\n readUint32() {\n return this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true\n }\n readUint64() {\n return this.view.getBigUint64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 8), true); // littleEndian = true\n }\n readBuffer() {\n const length = this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true\n return this._buffer.subarray(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, length), __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 0));\n }\n readUtf8String() {\n const length = this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true\n return utf8.read(this._buffer, __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, length), __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 0));\n }\n incrementWriteOffset(amount) {\n return __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, amount);\n }\n toBinary() {\n return this._buffer.subarray(0, this.woffset);\n }\n toCopiedBinary() {\n return new Uint8Array(this.toBinary());\n }\n writeBuffer(value, writeLength = true) {\n if (writeLength) {\n this.writeUint32(value.byteLength);\n }\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, value.byteLength);\n this._buffer.set(value, o);\n }\n writeUtf8String(value, writeLength = true) {\n const byteLength = utf8.length(value);\n if (writeLength) {\n this.writeUint32(byteLength);\n }\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, byteLength);\n utf8.write(value, this._buffer, o);\n }\n writeFloat32(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 4);\n this.view.setFloat32(o, value, true); // littleEndian = true\n }\n writeFloat64(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 8);\n this.view.setFloat64(o, value, true); // littleEndian = true\n }\n writeInt8(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 1);\n this.view.setInt8(o, value);\n }\n writeInt16(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 2);\n this.view.setInt16(o, value, true); // littleEndian = true\n }\n writeInt32(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 4);\n this.view.setInt32(o, value, true); // littleEndian = true\n }\n writeInt64(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 8);\n this.view.setBigInt64(o, value, true); // littleEndian = true\n }\n writeUint8(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 1);\n this.view.setUint8(o, value);\n }\n writeUint16(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 2);\n this.view.setUint16(o, value, true); // littleEndian = true\n }\n writeUint32(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 4);\n this.view.setUint32(o, value, true); // littleEndian = true\n }\n writeUint64(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 8);\n this.view.setBigUint64(o, value, true); // littleEndian = true\n }\n // DataView Proxy\n getFloat32(offset) {\n return this.view.getFloat32(offset, true); // littleEndian = true\n }\n getFloat64(offset) {\n return this.view.getFloat64(offset, true); // littleEndian = true\n }\n getInt8(offset) {\n return this.view.getInt8(offset);\n }\n getInt16(offset) {\n return this.view.getInt16(offset, true); // littleEndian = true\n }\n getInt32(offset) {\n return this.view.getInt32(offset, true); // littleEndian = true\n }\n getInt64(offset) {\n return this.view.getBigInt64(offset, true); // littleEndian = true\n }\n getUint8(offset) {\n return this.view.getUint8(offset);\n }\n getUint16(offset) {\n return this.view.getUint16(offset, true); // littleEndian = true\n }\n getUint32(offset) {\n return this.view.getUint32(offset, true); // littleEndian = true >>> 0\n }\n getUint64(offset) {\n return this.view.getBigUint64(offset, true); // littleEndian = true\n }\n setFloat32(offset, value) {\n this.view.setFloat32(offset, value, true); // littleEndian = true\n }\n setFloat64(offset, value) {\n this.view.setFloat64(offset, value, true); // littleEndian = true\n }\n setInt8(offset, value) {\n this.view.setInt8(offset, value);\n }\n setInt16(offset, value) {\n this.view.setInt16(offset, value, true); // littleEndian = true\n }\n setInt32(offset, value) {\n this.view.setInt32(offset, value, true); // littleEndian = true\n }\n setInt64(offset, value) {\n this.view.setBigInt64(offset, value, true); // littleEndian = true\n }\n setUint8(offset, value) {\n this.view.setUint8(offset, value);\n }\n setUint16(offset, value) {\n this.view.setUint16(offset, value, true); // littleEndian = true\n }\n setUint32(offset, value) {\n this.view.setUint32(offset, value, true); // littleEndian = true\n }\n setUint64(offset, value) {\n this.view.setBigUint64(offset, value, true); // littleEndian = true\n }\n}\n_ReadWriteByteBuffer_instances = new WeakSet(), _ReadWriteByteBuffer_woAdd = function _ReadWriteByteBuffer_woAdd(amount) {\n if (this.woffset + amount > this._buffer.byteLength) {\n const newsize = getNextSize(this._buffer.byteLength, this.woffset + amount);\n const newBuffer = new Uint8Array(newsize);\n newBuffer.set(this._buffer);\n const oldOffset = this._buffer.byteOffset;\n this._buffer = newBuffer;\n this.view = new DataView(this._buffer.buffer, oldOffset);\n }\n this.woffset += amount;\n return this.woffset - amount;\n}, _ReadWriteByteBuffer_roAdd = function _ReadWriteByteBuffer_roAdd(amount) {\n if (this.roffset + amount > this.woffset) {\n throw new Error('Outside of the bounds of writen data.');\n }\n this.roffset += amount;\n return this.roffset - amount;\n};\n", "/**\n * @public\n */\nexport var CrdtMessageType;\n(function (CrdtMessageType) {\n CrdtMessageType[CrdtMessageType[\"RESERVED\"] = 0] = \"RESERVED\";\n // Component Operation\n CrdtMessageType[CrdtMessageType[\"PUT_COMPONENT\"] = 1] = \"PUT_COMPONENT\";\n CrdtMessageType[CrdtMessageType[\"DELETE_COMPONENT\"] = 2] = \"DELETE_COMPONENT\";\n CrdtMessageType[CrdtMessageType[\"DELETE_ENTITY\"] = 3] = \"DELETE_ENTITY\";\n CrdtMessageType[CrdtMessageType[\"APPEND_VALUE\"] = 4] = \"APPEND_VALUE\";\n // Network operations\n CrdtMessageType[CrdtMessageType[\"PUT_COMPONENT_NETWORK\"] = 5] = \"PUT_COMPONENT_NETWORK\";\n CrdtMessageType[CrdtMessageType[\"DELETE_COMPONENT_NETWORK\"] = 6] = \"DELETE_COMPONENT_NETWORK\";\n CrdtMessageType[CrdtMessageType[\"DELETE_ENTITY_NETWORK\"] = 7] = \"DELETE_ENTITY_NETWORK\";\n CrdtMessageType[CrdtMessageType[\"MAX_MESSAGE_TYPE\"] = 8] = \"MAX_MESSAGE_TYPE\";\n})(CrdtMessageType || (CrdtMessageType = {}));\n/**\n * @public\n */\nexport const CRDT_MESSAGE_HEADER_LENGTH = 8;\nexport var ProcessMessageResultType;\n(function (ProcessMessageResultType) {\n /**\n * Typical message and new state set.\n * @state CHANGE\n * @reason Incoming message has a timestamp greater\n */\n ProcessMessageResultType[ProcessMessageResultType[\"StateUpdatedTimestamp\"] = 1] = \"StateUpdatedTimestamp\";\n /**\n * Typical message when it is considered old.\n * @state it does NOT CHANGE.\n * @reason incoming message has a timestamp lower.\n */\n ProcessMessageResultType[ProcessMessageResultType[\"StateOutdatedTimestamp\"] = 2] = \"StateOutdatedTimestamp\";\n /**\n * Weird message, same timestamp and data.\n * @state it does NOT CHANGE.\n * @reason consistent state between peers.\n */\n ProcessMessageResultType[ProcessMessageResultType[\"NoChanges\"] = 3] = \"NoChanges\";\n /**\n * Less but typical message, same timestamp, resolution by data.\n * @state it does NOT CHANGE.\n * @reason incoming message has a LOWER data.\n */\n ProcessMessageResultType[ProcessMessageResultType[\"StateOutdatedData\"] = 4] = \"StateOutdatedData\";\n /**\n * Less but typical message, same timestamp, resolution by data.\n * @state CHANGE.\n * @reason incoming message has a GREATER data.\n */\n ProcessMessageResultType[ProcessMessageResultType[\"StateUpdatedData\"] = 5] = \"StateUpdatedData\";\n /**\n * Entity was previously deleted.\n * @state it does NOT CHANGE.\n * @reason The message is considered old.\n */\n ProcessMessageResultType[ProcessMessageResultType[\"EntityWasDeleted\"] = 6] = \"EntityWasDeleted\";\n /**\n * Entity should be deleted.\n * @state CHANGE.\n * @reason the state is storing old entities\n */\n ProcessMessageResultType[ProcessMessageResultType[\"EntityDeleted\"] = 7] = \"EntityDeleted\";\n})(ProcessMessageResultType || (ProcessMessageResultType = {}));\n// we receive LWW, v=6, we have v=5 => we receive with delay the deleteEntity(v=5)\n// => we should generate the deleteEntity message effects internally with deleteEntity(v=5),\n// but don't resend the deleteEntity\n// - (CRDT) addDeletedEntitySet v=5 (with crdt state cleaning) and then LWW v=6\n// - (engine) engine.deleteEntity v=5\n// we receive LWW, v=7, we have v=5 => we receive with delay the deleteEntity(v=5), deleteEntity(v=6), ..., N\n// => we should generate the deleteEntity message effects internally with deleteEntity(v=5),\n// but don't resend the deleteEntity\n// - (CRDT) addDeletedEntitySet v=5 (with crdt state cleaning) and then LWW v=6\n// - (engine) engine.deleteEntity v=5\n// msg delete entity: it only should be sent by deleter\n//\n", "import { CRDT_MESSAGE_HEADER_LENGTH } from './types';\n/**\n * @public\n */\nexport var CrdtMessageProtocol;\n(function (CrdtMessageProtocol) {\n /**\n * Validate if the message incoming is completed\n * @param buf - ByteBuffer\n */\n function validate(buf) {\n const rem = buf.remainingBytes();\n if (rem < CRDT_MESSAGE_HEADER_LENGTH) {\n return false;\n }\n const messageLength = buf.getUint32(buf.currentReadOffset());\n if (rem < messageLength) {\n return false;\n }\n return true;\n }\n CrdtMessageProtocol.validate = validate;\n /**\n * Get the current header, consuming the bytes involved.\n * @param buf - ByteBuffer\n * @returns header or null if there is no validated message\n */\n function readHeader(buf) {\n if (!validate(buf)) {\n return null;\n }\n return {\n length: buf.readUint32(),\n type: buf.readUint32()\n };\n }\n CrdtMessageProtocol.readHeader = readHeader;\n /**\n * Get the current header, without consuming the bytes involved.\n * @param buf - ByteBuffer\n * @returns header or null if there is no validated message\n */\n function getHeader(buf) {\n if (!validate(buf)) {\n return null;\n }\n const currentOffset = buf.currentReadOffset();\n return {\n length: buf.getUint32(currentOffset),\n type: buf.getUint32(currentOffset + 4)\n };\n }\n CrdtMessageProtocol.getHeader = getHeader;\n /**\n * Consume the incoming message without processing it.\n * @param buf - ByteBuffer\n * @returns true in case of success or false if there is no valid message.\n */\n function consumeMessage(buf) {\n const header = getHeader(buf);\n if (!header) {\n return false;\n }\n buf.incrementReadOffset(header.length);\n return true;\n }\n CrdtMessageProtocol.consumeMessage = consumeMessage;\n})(CrdtMessageProtocol || (CrdtMessageProtocol = {}));\n", "import { CrdtMessageProtocol } from './crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from './types';\n/**\n * @public\n */\nexport var DeleteComponent;\n(function (DeleteComponent) {\n DeleteComponent.MESSAGE_HEADER_LENGTH = 12;\n /**\n * Write DeleteComponent message\n */\n function write(entity, componentId, timestamp, buf) {\n // reserve the beginning\n const messageLength = CRDT_MESSAGE_HEADER_LENGTH + DeleteComponent.MESSAGE_HEADER_LENGTH;\n const startMessageOffset = buf.incrementWriteOffset(messageLength);\n // Write CrdtMessage header\n buf.setUint32(startMessageOffset, messageLength);\n buf.setUint32(startMessageOffset + 4, CrdtMessageType.DELETE_COMPONENT);\n // Write ComponentOperation header\n buf.setUint32(startMessageOffset + 8, entity);\n buf.setUint32(startMessageOffset + 12, componentId);\n buf.setUint32(startMessageOffset + 16, timestamp);\n }\n DeleteComponent.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.DELETE_COMPONENT) {\n throw new Error('DeleteComponentOperation tried to read another message type.');\n }\n const msg = {\n ...header,\n entityId: buf.readUint32(),\n componentId: buf.readUint32(),\n timestamp: buf.readUint32()\n };\n return msg;\n }\n DeleteComponent.read = read;\n})(DeleteComponent || (DeleteComponent = {}));\n", "import { CrdtMessageProtocol } from './crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from './types';\n/**\n * @public\n */\nexport var AppendValueOperation;\n(function (AppendValueOperation) {\n AppendValueOperation.MESSAGE_HEADER_LENGTH = 16;\n /**\n * Call this function for an optimal writing data passing the ByteBuffer\n * already allocated\n */\n function write(entity, timestamp, componentId, data, buf) {\n // reserve the beginning\n const startMessageOffset = buf.incrementWriteOffset(CRDT_MESSAGE_HEADER_LENGTH + AppendValueOperation.MESSAGE_HEADER_LENGTH);\n // write body\n buf.writeBuffer(data, false);\n const messageLength = buf.currentWriteOffset() - startMessageOffset;\n // Write CrdtMessage header\n buf.setUint32(startMessageOffset, messageLength);\n buf.setUint32(startMessageOffset + 4, CrdtMessageType.APPEND_VALUE);\n // Write ComponentOperation header\n buf.setUint32(startMessageOffset + 8, entity);\n buf.setUint32(startMessageOffset + 12, componentId);\n buf.setUint32(startMessageOffset + 16, timestamp);\n const newLocal = messageLength - AppendValueOperation.MESSAGE_HEADER_LENGTH - CRDT_MESSAGE_HEADER_LENGTH;\n buf.setUint32(startMessageOffset + 20, newLocal);\n }\n AppendValueOperation.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n /* istanbul ignore if */\n if (!header) {\n return null;\n }\n /* istanbul ignore if */\n if (header.type !== CrdtMessageType.APPEND_VALUE) {\n throw new Error('AppendValueOperation tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32(),\n componentId: buf.readUint32(),\n timestamp: buf.readUint32(),\n data: buf.readBuffer()\n };\n }\n AppendValueOperation.read = read;\n})(AppendValueOperation || (AppendValueOperation = {}));\n", "import { CrdtMessageProtocol } from './crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from './types';\n/**\n * @public\n */\nexport var DeleteEntity;\n(function (DeleteEntity) {\n DeleteEntity.MESSAGE_HEADER_LENGTH = 4;\n function write(entity, buf) {\n // Write CrdtMessage header\n buf.writeUint32(CRDT_MESSAGE_HEADER_LENGTH + 4);\n buf.writeUint32(CrdtMessageType.DELETE_ENTITY);\n // body\n buf.writeUint32(entity);\n }\n DeleteEntity.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.DELETE_ENTITY) {\n throw new Error('DeleteEntity tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32()\n };\n }\n DeleteEntity.read = read;\n})(DeleteEntity || (DeleteEntity = {}));\n", "import { CrdtMessageProtocol } from './crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from './types';\n/**\n * @public\n */\nexport var PutComponentOperation;\n(function (PutComponentOperation) {\n PutComponentOperation.MESSAGE_HEADER_LENGTH = 16;\n /**\n * Call this function for an optimal writing data passing the ByteBuffer\n * already allocated\n */\n function write(entity, timestamp, componentId, data, buf) {\n // reserve the beginning\n const startMessageOffset = buf.incrementWriteOffset(CRDT_MESSAGE_HEADER_LENGTH + PutComponentOperation.MESSAGE_HEADER_LENGTH);\n // write body\n buf.writeBuffer(data, false);\n const messageLength = buf.currentWriteOffset() - startMessageOffset;\n // Write CrdtMessage header\n buf.setUint32(startMessageOffset, messageLength);\n buf.setUint32(startMessageOffset + 4, CrdtMessageType.PUT_COMPONENT);\n // Write ComponentOperation header\n buf.setUint32(startMessageOffset + 8, entity);\n buf.setUint32(startMessageOffset + 12, componentId);\n buf.setUint32(startMessageOffset + 16, timestamp);\n const newLocal = messageLength - PutComponentOperation.MESSAGE_HEADER_LENGTH - CRDT_MESSAGE_HEADER_LENGTH;\n buf.setUint32(startMessageOffset + 20, newLocal);\n }\n PutComponentOperation.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.PUT_COMPONENT) {\n throw new Error('PutComponentOperation tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32(),\n componentId: buf.readUint32(),\n timestamp: buf.readUint32(),\n data: buf.readBuffer()\n };\n }\n PutComponentOperation.read = read;\n})(PutComponentOperation || (PutComponentOperation = {}));\n", "import { CrdtMessageProtocol } from '../crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from '../types';\n/**\n * @public\n */\nexport var PutNetworkComponentOperation;\n(function (PutNetworkComponentOperation) {\n PutNetworkComponentOperation.MESSAGE_HEADER_LENGTH = 20;\n /**\n * Call this function for an optimal writing data passing the ByteBuffer\n * already allocated\n */\n function write(entity, timestamp, componentId, networkId, data, buf) {\n // reserve the beginning\n const startMessageOffset = buf.incrementWriteOffset(CRDT_MESSAGE_HEADER_LENGTH + PutNetworkComponentOperation.MESSAGE_HEADER_LENGTH);\n // write body\n buf.writeBuffer(data, false);\n const messageLength = buf.currentWriteOffset() - startMessageOffset;\n // Write CrdtMessage header\n buf.setUint32(startMessageOffset, messageLength);\n buf.setUint32(startMessageOffset + 4, CrdtMessageType.PUT_COMPONENT_NETWORK);\n // Write ComponentOperation header\n buf.setUint32(startMessageOffset + 8, entity);\n buf.setUint32(startMessageOffset + 12, componentId);\n buf.setUint32(startMessageOffset + 16, timestamp);\n buf.setUint32(startMessageOffset + 20, networkId);\n const dataLength = messageLength - PutNetworkComponentOperation.MESSAGE_HEADER_LENGTH - CRDT_MESSAGE_HEADER_LENGTH;\n buf.setUint32(startMessageOffset + 24, dataLength);\n }\n PutNetworkComponentOperation.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.PUT_COMPONENT_NETWORK) {\n throw new Error('PutComponentOperation tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32(),\n componentId: buf.readUint32(),\n timestamp: buf.readUint32(),\n networkId: buf.readUint32(),\n data: buf.readBuffer()\n };\n }\n PutNetworkComponentOperation.read = read;\n})(PutNetworkComponentOperation || (PutNetworkComponentOperation = {}));\n", "import { CrdtMessageProtocol } from '../crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from '../types';\n/**\n * @public\n */\nexport var DeleteComponentNetwork;\n(function (DeleteComponentNetwork) {\n DeleteComponentNetwork.MESSAGE_HEADER_LENGTH = 16;\n /**\n * Write DeleteComponent message\n */\n function write(entity, componentId, timestamp, networkId, buf) {\n // reserve the beginning\n const messageLength = CRDT_MESSAGE_HEADER_LENGTH + DeleteComponentNetwork.MESSAGE_HEADER_LENGTH;\n const startMessageOffset = buf.incrementWriteOffset(messageLength);\n // Write CrdtMessage header\n buf.setUint32(startMessageOffset, messageLength);\n buf.setUint32(startMessageOffset + 4, CrdtMessageType.DELETE_COMPONENT_NETWORK);\n // Write ComponentOperation header\n buf.setUint32(startMessageOffset + 8, entity);\n buf.setUint32(startMessageOffset + 12, componentId);\n buf.setUint32(startMessageOffset + 16, timestamp);\n buf.setUint32(startMessageOffset + 20, networkId);\n }\n DeleteComponentNetwork.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.DELETE_COMPONENT_NETWORK) {\n throw new Error('DeleteComponentOperation tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32(),\n componentId: buf.readUint32(),\n timestamp: buf.readUint32(),\n networkId: buf.readUint32()\n };\n }\n DeleteComponentNetwork.read = read;\n})(DeleteComponentNetwork || (DeleteComponentNetwork = {}));\n", "import { CrdtMessageProtocol } from '../crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from '../types';\n/**\n * @public\n */\nexport var DeleteEntityNetwork;\n(function (DeleteEntityNetwork) {\n DeleteEntityNetwork.MESSAGE_HEADER_LENGTH = 8;\n function write(entity, networkId, buf) {\n // Write CrdtMessage header\n buf.writeUint32(CRDT_MESSAGE_HEADER_LENGTH + 4);\n buf.writeUint32(CrdtMessageType.DELETE_ENTITY_NETWORK);\n // body\n buf.writeUint32(entity);\n buf.writeUint32(networkId);\n }\n DeleteEntityNetwork.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.DELETE_ENTITY_NETWORK) {\n throw new Error('DeleteEntityNetwork tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32(),\n networkId: buf.readUint32()\n };\n }\n DeleteEntityNetwork.read = read;\n})(DeleteEntityNetwork || (DeleteEntityNetwork = {}));\n", "import { ReadWriteByteBuffer } from '../../ByteBuffer';\nimport { PutComponentOperation } from '../putComponent';\nimport { CrdtMessageType } from '../types';\nimport { DeleteComponent } from '../deleteComponent';\nimport { DeleteEntity } from '../deleteEntity';\nimport { PutNetworkComponentOperation } from './putComponentNetwork';\nimport { DeleteComponentNetwork } from './deleteComponentNetwork';\nimport { DeleteEntityNetwork } from './deleteEntityNetwork';\nimport { TransformSchema } from '../../../components/manual/Transform';\nexport function isNetworkMessage(message) {\n return [\n CrdtMessageType.DELETE_COMPONENT_NETWORK,\n CrdtMessageType.DELETE_ENTITY_NETWORK,\n CrdtMessageType.PUT_COMPONENT_NETWORK\n ].includes(message.type);\n}\nexport function networkMessageToLocal(message, localEntityId, buffer, destinationBuffer) {\n const offset = buffer.currentWriteOffset();\n if (message.type === CrdtMessageType.PUT_COMPONENT_NETWORK) {\n PutComponentOperation.write(localEntityId, message.timestamp, message.componentId, message.data, buffer);\n }\n else if (message.type === CrdtMessageType.DELETE_COMPONENT_NETWORK) {\n DeleteComponent.write(localEntityId, message.componentId, message.timestamp, buffer);\n }\n else if (message.type === CrdtMessageType.DELETE_ENTITY_NETWORK) {\n DeleteEntity.write(localEntityId, buffer);\n }\n destinationBuffer.writeBuffer(buffer.buffer().subarray(offset, buffer.currentWriteOffset()), false);\n}\nexport function localMessageToNetwork(message, network, buffer, destinationBuffer) {\n const offset = buffer.currentWriteOffset();\n if (message.type === CrdtMessageType.PUT_COMPONENT) {\n PutNetworkComponentOperation.write(network.entityId, message.timestamp, message.componentId, network.networkId, message.data, buffer);\n }\n else if (message.type === CrdtMessageType.DELETE_COMPONENT) {\n DeleteComponentNetwork.write(network.entityId, message.componentId, message.timestamp, network.networkId, buffer);\n }\n else if (message.type === CrdtMessageType.DELETE_ENTITY) {\n DeleteEntityNetwork.write(network.entityId, network.networkId, buffer);\n }\n destinationBuffer.writeBuffer(buffer.buffer().subarray(offset, buffer.currentWriteOffset()), false);\n}\nexport function fixTransformParent(message, transformValue, parent) {\n let transform = transformValue;\n const buffer = new ReadWriteByteBuffer();\n if (!transform && 'data' in message) {\n buffer.writeBuffer(message.data);\n transform = TransformSchema.deserialize(buffer);\n buffer.resetBuffer();\n }\n if (!transform)\n throw new Error('Invalid parent transform');\n // Generate new transform raw data with the parent\n const newTransform = { ...transform, parent };\n buffer.resetBuffer();\n TransformSchema.serialize(newTransform, buffer);\n return buffer.toBinary();\n}\n", "import { EntityState } from '../../engine/entity';\nimport { ReadWriteByteBuffer } from '../../serialization/ByteBuffer';\nimport { AppendValueOperation, CrdtMessageProtocol, DeleteComponentNetwork, DeleteEntityNetwork } from '../../serialization/crdt';\nimport { DeleteComponent } from '../../serialization/crdt/deleteComponent';\nimport { DeleteEntity } from '../../serialization/crdt/deleteEntity';\nimport { PutComponentOperation } from '../../serialization/crdt/putComponent';\nimport { CrdtMessageType } from '../../serialization/crdt/types';\nimport { PutNetworkComponentOperation } from '../../serialization/crdt/network/putComponentNetwork';\nimport { NetworkEntity as defineNetworkEntity, NetworkParent as defineNetworkParent, Transform as defineTransform } from '../../components';\nimport * as networkUtils from '../../serialization/crdt/network/utils';\n/**\n * @internal\n */\nexport function crdtSceneSystem(engine, onProcessEntityComponentChange) {\n const transports = [];\n // Components that we used on this system\n const NetworkEntity = defineNetworkEntity(engine);\n const NetworkParent = defineNetworkParent(engine);\n const Transform = defineTransform(engine);\n // Messages that we received at transport.onMessage waiting to be processed\n const receivedMessages = [];\n // Messages already processed by the engine but that we need to broadcast to other transports.\n const broadcastMessages = [];\n /**\n *\n * @param transportId tranport id to identiy messages\n * @returns a function to process received messages\n */\n function parseChunkMessage(transportId) {\n /**\n * Receives a chunk of binary messages and stores all the valid\n * Component Operation Messages at messages queue\n * @param chunkMessage A chunk of binary messages\n */\n return function parseChunkMessage(chunkMessage) {\n const buffer = new ReadWriteByteBuffer(chunkMessage);\n let header;\n while ((header = CrdtMessageProtocol.getHeader(buffer))) {\n const offset = buffer.currentReadOffset();\n let message = undefined;\n if (header.type === CrdtMessageType.DELETE_COMPONENT) {\n message = DeleteComponent.read(buffer);\n }\n else if (header.type === CrdtMessageType.DELETE_COMPONENT_NETWORK) {\n message = DeleteComponentNetwork.read(buffer);\n }\n else if (header.type === CrdtMessageType.PUT_COMPONENT) {\n message = PutComponentOperation.read(buffer);\n }\n else if (header.type === CrdtMessageType.PUT_COMPONENT_NETWORK) {\n message = PutNetworkComponentOperation.read(buffer);\n }\n else if (header.type === CrdtMessageType.DELETE_ENTITY) {\n message = DeleteEntity.read(buffer);\n }\n else if (header.type === CrdtMessageType.DELETE_ENTITY_NETWORK) {\n message = DeleteEntityNetwork.read(buffer);\n }\n else if (header.type === CrdtMessageType.APPEND_VALUE) {\n message = AppendValueOperation.read(buffer);\n // Unknown message, we skip it\n }\n else {\n // consume the message\n buffer.incrementReadOffset(header.length);\n }\n if (message) {\n receivedMessages.push({\n ...message,\n transportId,\n messageBuffer: buffer.buffer().subarray(offset, buffer.currentReadOffset())\n });\n }\n }\n };\n }\n /**\n * Return and clear the messaes queue\n * @returns messages recieved by the transport to process on the next tick\n */\n function getMessages(value) {\n const messagesToProcess = value.splice(0, value.length);\n return messagesToProcess;\n }\n /**\n * Find the local entityId associated to the network component message.\n * It's a mapping Network -> to Local\n * If it's not a network message, return the entityId received by the message\n */\n function findNetworkId(msg) {\n const hasNetworkId = 'networkId' in msg;\n if (hasNetworkId) {\n for (const [entityId, network] of engine.getEntitiesWith(NetworkEntity)) {\n if (network.networkId === msg.networkId && network.entityId === msg.entityId) {\n return { entityId, network };\n }\n }\n }\n return { entityId: msg.entityId };\n }\n /**\n * This fn will be called on every tick.\n * Process all the messages queue received by the transport\n */\n async function receiveMessages() {\n const messagesToProcess = getMessages(receivedMessages);\n const entitiesShouldBeCleaned = [];\n for (const msg of messagesToProcess) {\n // eslint-disable-next-line prefer-const\n let { entityId, network } = findNetworkId(msg);\n // We receive a new Entity. Create the localEntity and map it to the NetworkEntity component\n if (networkUtils.isNetworkMessage(msg) && !network) {\n entityId = engine.addEntity();\n network = { entityId: msg.entityId, networkId: msg.networkId };\n NetworkEntity.createOrReplace(entityId, network);\n }\n if (msg.type === CrdtMessageType.DELETE_ENTITY || msg.type === CrdtMessageType.DELETE_ENTITY_NETWORK) {\n entitiesShouldBeCleaned.push(entityId);\n broadcastMessages.push(msg);\n }\n else {\n const entityState = engine.entityContainer.getEntityState(entityId);\n // Skip updates from removed entityes\n if (entityState === EntityState.Removed)\n continue;\n // Entities with unknown entities should update its entity state\n if (entityState === EntityState.Unknown) {\n engine.entityContainer.updateUsedEntity(entityId);\n }\n const component = engine.getComponentOrNull(msg.componentId);\n /* istanbul ignore else */\n if (component) {\n if (msg.type === CrdtMessageType.PUT_COMPONENT &&\n component.componentId === Transform.componentId &&\n NetworkEntity.has(entityId) &&\n NetworkParent.has(entityId)) {\n msg.data = networkUtils.fixTransformParent(msg);\n }\n const [conflictMessage, value] = component.updateFromCrdt({ ...msg, entityId });\n if (!conflictMessage) {\n // Add message to transport queue to be processed by others transports\n broadcastMessages.push(msg);\n onProcessEntityComponentChange && onProcessEntityComponentChange(msg.entityId, msg.type, component, value);\n }\n }\n else {\n // TODO: test this line, it is fundammental to make the editor work\n broadcastMessages.push(msg);\n }\n }\n }\n // the last stage of the syncrhonization is to delete the entities\n for (const entity of entitiesShouldBeCleaned) {\n for (const definition of engine.componentsIter()) {\n // TODO: check this with pato/pravus\n definition.entityDeleted(entity, true);\n }\n engine.entityContainer.updateRemovedEntity(entity);\n onProcessEntityComponentChange && onProcessEntityComponentChange(entity, CrdtMessageType.DELETE_ENTITY);\n }\n }\n /**\n * Iterates the dirty map and generates crdt messages to be send\n */\n async function sendMessages(entitiesDeletedThisTick) {\n // CRDT Messages will be the merge between the recieved transport messages and the new crdt messages\n const crdtMessages = getMessages(broadcastMessages);\n const buffer = new ReadWriteByteBuffer();\n for (const component of engine.componentsIter()) {\n for (const message of component.getCrdtUpdates()) {\n const offset = buffer.currentWriteOffset();\n // Avoid creating messages if there is no transport that will handle it\n if (transports.some((t) => t.filter(message))) {\n if (message.type === CrdtMessageType.PUT_COMPONENT) {\n PutComponentOperation.write(message.entityId, message.timestamp, message.componentId, message.data, buffer);\n }\n else if (message.type === CrdtMessageType.DELETE_COMPONENT) {\n DeleteComponent.write(message.entityId, component.componentId, message.timestamp, buffer);\n }\n else if (message.type === CrdtMessageType.APPEND_VALUE) {\n AppendValueOperation.write(message.entityId, message.timestamp, message.componentId, message.data, buffer);\n }\n crdtMessages.push({\n ...message,\n messageBuffer: buffer.buffer().subarray(offset, buffer.currentWriteOffset())\n });\n if (onProcessEntityComponentChange) {\n const rawValue = message.type === CrdtMessageType.PUT_COMPONENT || message.type === CrdtMessageType.APPEND_VALUE\n ? component.get(message.entityId)\n : undefined;\n onProcessEntityComponentChange(message.entityId, message.type, component, rawValue);\n }\n }\n }\n }\n // After all updates, I execute the DeletedEntity messages\n for (const entityId of entitiesDeletedThisTick) {\n const offset = buffer.currentWriteOffset();\n DeleteEntity.write(entityId, buffer);\n crdtMessages.push({\n type: CrdtMessageType.DELETE_ENTITY,\n entityId,\n messageBuffer: buffer.buffer().subarray(offset, buffer.currentWriteOffset())\n });\n onProcessEntityComponentChange && onProcessEntityComponentChange(entityId, CrdtMessageType.DELETE_ENTITY);\n }\n // Send CRDT messages to transports\n const transportBuffer = new ReadWriteByteBuffer();\n for (const index in transports) {\n const transportIndex = Number(index);\n const transport = transports[transportIndex];\n const isRendererTransport = transport.type === 'renderer';\n const isNetworkTransport = transport.type === 'network';\n transportBuffer.resetBuffer();\n const buffer = new ReadWriteByteBuffer();\n // Then we send all the new crdtMessages that the transport needs to process\n for (const message of crdtMessages) {\n // Avoid echo messages\n if (message.transportId === transportIndex)\n continue;\n // Redundant message for the transport\n if (!transport.filter(message))\n continue;\n const { entityId } = findNetworkId(message);\n const transformNeedsFix = 'componentId' in message &&\n message.componentId === Transform.componentId &&\n Transform.has(entityId) &&\n NetworkParent.has(entityId) &&\n NetworkEntity.has(entityId);\n // If there was a LOCAL change in the transform. Add the parent to that transform\n if (isRendererTransport && message.type === CrdtMessageType.PUT_COMPONENT && transformNeedsFix) {\n const parent = findNetworkId(NetworkParent.get(entityId));\n const transformData = networkUtils.fixTransformParent(message, Transform.get(entityId), parent.entityId);\n const offset = buffer.currentWriteOffset();\n PutComponentOperation.write(entityId, message.timestamp, message.componentId, transformData, buffer);\n transportBuffer.writeBuffer(buffer.buffer().subarray(offset, buffer.currentWriteOffset()), false);\n continue;\n }\n if (isRendererTransport && networkUtils.isNetworkMessage(message)) {\n // If it's the renderer transport and its a NetworkMessage, we need to fix the entityId field and convert it to a known Message.\n // PUT_NETWORK_COMPONENT -> PUT_COMPONENT\n let transformData = 'data' in message ? message.data : new Uint8Array();\n if (transformNeedsFix) {\n const parent = findNetworkId(NetworkParent.get(entityId));\n transformData = networkUtils.fixTransformParent(message, Transform.get(entityId), parent.entityId);\n }\n networkUtils.networkMessageToLocal({ ...message, data: transformData }, entityId, buffer, transportBuffer);\n // Iterate the next message\n continue;\n }\n // If its a network transport and its a PUT_COMPONENT that has a NetworkEntity component, we need to send this message\n // through comms with the EntityID and NetworkID from ther NetworkEntity so everyone can recieve this message and map to their custom entityID.\n if (isNetworkTransport && !networkUtils.isNetworkMessage(message)) {\n const networkData = NetworkEntity.getOrNull(message.entityId);\n // If it has networkData convert the message to PUT_NETWORK_COMPONENT.\n if (networkData) {\n networkUtils.localMessageToNetwork(message, networkData, buffer, transportBuffer);\n // Iterate the next message\n continue;\n }\n }\n // Common message\n transportBuffer.writeBuffer(message.messageBuffer, false);\n }\n const message = transportBuffer.currentWriteOffset() ? transportBuffer.toBinary() : new Uint8Array([]);\n await transport.send(message);\n }\n }\n /**\n * @public\n * Add a transport to the crdt system\n */\n function addTransport(transport) {\n const id = transports.push(transport) - 1;\n transport.onmessage = parseChunkMessage(id);\n }\n return {\n sendMessages,\n receiveMessages,\n addTransport\n };\n}\n", "export var CrdtUtils;\n(function (CrdtUtils) {\n let SynchronizedEntityType;\n (function (SynchronizedEntityType) {\n // synchronizes entities with the NetworkSynchronized component only, used for networked games\n SynchronizedEntityType[SynchronizedEntityType[\"NETWORKED\"] = 0] = \"NETWORKED\";\n // synchronizes entities needed by the renderer\n SynchronizedEntityType[SynchronizedEntityType[\"RENDERER\"] = 1] = \"RENDERER\";\n })(SynchronizedEntityType = CrdtUtils.SynchronizedEntityType || (CrdtUtils.SynchronizedEntityType = {}));\n})(CrdtUtils || (CrdtUtils = {}));\nexport default CrdtUtils;\n/**\n * Compare raw data.\n * @public\n * @returns 0 if is the same data, 1 if a > b, -1 if b > a\n */\nexport function dataCompare(a, b) {\n // At reference level\n if (a === b)\n return 0;\n if (a === null && b !== null)\n return -1;\n if (a !== null && b === null)\n return 1;\n if (a instanceof Uint8Array && b instanceof Uint8Array) {\n const lengthDifference = a.byteLength - b.byteLength;\n if (lengthDifference !== 0) {\n return lengthDifference > 0 ? 1 : -1;\n }\n let res;\n for (let i = 0, n = a.byteLength; i < n; i++) {\n res = a[i] - b[i];\n if (res !== 0) {\n return res > 0 ? 1 : -1;\n }\n }\n // the data is exactly the same\n return 0;\n }\n if (typeof a === 'string') {\n const lengthDifference = a.length - b.length;\n if (lengthDifference !== 0) {\n return lengthDifference > 0 ? 1 : -1;\n }\n return a.localeCompare(b);\n }\n return a > b ? 1 : -1;\n}\n", "/**\n * @internal\n */\nexport function deepReadonly(val) {\n return Object.freeze({ ...val });\n}\n", "import { ReadWriteByteBuffer } from '../serialization/ByteBuffer';\nimport { ProcessMessageResultType, CrdtMessageType, PutComponentOperation, DeleteComponent } from '../serialization/crdt';\nimport { dataCompare } from '../systems/crdt/utils';\nimport { deepReadonly } from './readonly';\nexport function incrementTimestamp(entity, timestamps) {\n const newTimestamp = (timestamps.get(entity) || 0) + 1;\n timestamps.set(entity, newTimestamp);\n return newTimestamp;\n}\nexport function createDumpLwwFunctionFromCrdt(componentId, timestamps, schema, data) {\n return function dumpCrdtState(buffer, filterEntity) {\n for (const [entity, timestamp] of timestamps) {\n /* istanbul ignore if */\n if (filterEntity) {\n // I swear that this is being tested on state-to-crdt.spec but jest is trolling me\n /* istanbul ignore next */\n if (!filterEntity(entity))\n continue;\n }\n /* istanbul ignore else */\n if (data.has(entity)) {\n const it = data.get(entity);\n const buf = new ReadWriteByteBuffer();\n schema.serialize(it, buf);\n PutComponentOperation.write(entity, timestamp, componentId, buf.toBinary(), buffer);\n }\n else {\n DeleteComponent.write(entity, componentId, timestamp, buffer);\n }\n }\n };\n}\nexport function createUpdateLwwFromCrdt(componentId, timestamps, schema, data) {\n /**\n * Process the received message only if the lamport number recieved is higher\n * than the stored one. If its lower, we spread it to the network to correct the peer.\n * If they are equal, the bigger raw data wins.\n \n * Returns the recieved data if the lamport number was bigger than ours.\n * If it was an outdated message, then we return void\n * @public\n */\n function crdtRuleForCurrentState(message) {\n const { entityId, timestamp } = message;\n const currentTimestamp = timestamps.get(entityId);\n // The received message is > than our current value, update our state.components.\n if (currentTimestamp === undefined || currentTimestamp < timestamp) {\n return ProcessMessageResultType.StateUpdatedTimestamp;\n }\n // Outdated Message. Resend our state message through the wire.\n if (currentTimestamp > timestamp) {\n // console.log('2', currentTimestamp, timestamp)\n return ProcessMessageResultType.StateOutdatedTimestamp;\n }\n // Deletes are idempotent\n if (message.type === CrdtMessageType.DELETE_COMPONENT && !data.has(entityId)) {\n return ProcessMessageResultType.NoChanges;\n }\n let currentDataGreater = 0;\n if (data.has(entityId)) {\n const writeBuffer = new ReadWriteByteBuffer();\n schema.serialize(data.get(entityId), writeBuffer);\n currentDataGreater = dataCompare(writeBuffer.toBinary(), message.data || null);\n }\n else {\n currentDataGreater = dataCompare(null, message.data);\n }\n // Same data, same timestamp. Weirdo echo message.\n // console.log('3', currentDataGreater, writeBuffer.toBinary(), (message as any).data || null)\n if (currentDataGreater === 0) {\n return ProcessMessageResultType.NoChanges;\n }\n else if (currentDataGreater > 0) {\n // Current data is greater\n return ProcessMessageResultType.StateOutdatedData;\n }\n else {\n // Curent data is lower\n return ProcessMessageResultType.StateUpdatedData;\n }\n }\n return (msg) => {\n /* istanbul ignore next */\n if (msg.type !== CrdtMessageType.PUT_COMPONENT &&\n msg.type !== CrdtMessageType.PUT_COMPONENT_NETWORK &&\n msg.type !== CrdtMessageType.DELETE_COMPONENT &&\n msg.type !== CrdtMessageType.DELETE_COMPONENT_NETWORK)\n /* istanbul ignore next */\n return [null, data.get(msg.entityId)];\n const action = crdtRuleForCurrentState(msg);\n const entity = msg.entityId;\n switch (action) {\n case ProcessMessageResultType.StateUpdatedData:\n case ProcessMessageResultType.StateUpdatedTimestamp: {\n timestamps.set(entity, msg.timestamp);\n if (msg.type === CrdtMessageType.PUT_COMPONENT || msg.type === CrdtMessageType.PUT_COMPONENT_NETWORK) {\n const buf = new ReadWriteByteBuffer(msg.data);\n data.set(entity, schema.deserialize(buf));\n }\n else {\n data.delete(entity);\n }\n return [null, data.get(entity)];\n }\n case ProcessMessageResultType.StateOutdatedTimestamp:\n case ProcessMessageResultType.StateOutdatedData: {\n if (data.has(entity)) {\n const writeBuffer = new ReadWriteByteBuffer();\n schema.serialize(data.get(entity), writeBuffer);\n return [\n {\n type: CrdtMessageType.PUT_COMPONENT,\n componentId,\n data: writeBuffer.toBinary(),\n entityId: entity,\n timestamp: timestamps.get(entity)\n },\n data.get(entity)\n ];\n }\n else {\n return [\n {\n type: CrdtMessageType.DELETE_COMPONENT,\n componentId,\n entityId: entity,\n timestamp: timestamps.get(entity)\n },\n undefined\n ];\n }\n }\n }\n return [null, data.get(entity)];\n };\n}\nexport function createGetCrdtMessagesForLww(componentId, timestamps, dirtyIterator, schema, data) {\n return function* () {\n for (const entity of dirtyIterator) {\n const newTimestamp = incrementTimestamp(entity, timestamps);\n if (data.has(entity)) {\n const writeBuffer = new ReadWriteByteBuffer();\n schema.serialize(data.get(entity), writeBuffer);\n const msg = {\n type: CrdtMessageType.PUT_COMPONENT,\n componentId,\n entityId: entity,\n data: writeBuffer.toBinary(),\n timestamp: newTimestamp\n };\n yield msg;\n }\n else {\n const msg = {\n type: CrdtMessageType.DELETE_COMPONENT,\n componentId,\n entityId: entity,\n timestamp: newTimestamp\n };\n yield msg;\n }\n }\n dirtyIterator.clear();\n };\n}\n/**\n * @internal\n */\nexport function createComponentDefinitionFromSchema(componentName, componentId, schema) {\n const data = new Map();\n const dirtyIterator = new Set();\n const timestamps = new Map();\n return {\n get componentId() {\n return componentId;\n },\n get componentName() {\n return componentName;\n },\n get componentType() {\n // a getter is used here to prevent accidental changes\n return 0 /* ComponentType.LastWriteWinElementSet */;\n },\n schema,\n has(entity) {\n return data.has(entity);\n },\n deleteFrom(entity, markAsDirty = true) {\n const component = data.get(entity);\n if (data.delete(entity) && markAsDirty) {\n dirtyIterator.add(entity);\n }\n return component || null;\n },\n entityDeleted(entity, markAsDirty) {\n if (data.delete(entity) && markAsDirty) {\n dirtyIterator.add(entity);\n }\n },\n getOrNull(entity) {\n const component = data.get(entity);\n return component ? deepReadonly(component) : null;\n },\n get(entity) {\n const component = data.get(entity);\n if (!component) {\n throw new Error(`[getFrom] Component ${componentName} for entity #${entity} not found`);\n }\n return deepReadonly(component);\n },\n create(entity, value) {\n const component = data.get(entity);\n if (component) {\n throw new Error(`[create] Component ${componentName} for ${entity} already exists`);\n }\n const usedValue = value === undefined ? schema.create() : schema.extend ? schema.extend(value) : value;\n data.set(entity, usedValue);\n dirtyIterator.add(entity);\n return usedValue;\n },\n createOrReplace(entity, value) {\n const usedValue = value === undefined ? schema.create() : schema.extend ? schema.extend(value) : value;\n data.set(entity, usedValue);\n dirtyIterator.add(entity);\n return usedValue;\n },\n getMutableOrNull(entity) {\n const component = data.get(entity);\n if (!component) {\n return null;\n }\n dirtyIterator.add(entity);\n return component;\n },\n getOrCreateMutable(entity, value) {\n const component = data.get(entity);\n if (!component) {\n return this.create(entity, value);\n }\n else {\n dirtyIterator.add(entity);\n return component;\n }\n },\n getMutable(entity) {\n const component = this.getMutableOrNull(entity);\n if (component === null) {\n throw new Error(`[mutable] Component ${componentName} for ${entity} not found`);\n }\n return component;\n },\n *iterator() {\n for (const [entity, component] of data) {\n yield [entity, component];\n }\n },\n *dirtyIterator() {\n for (const entity of dirtyIterator) {\n yield entity;\n }\n },\n getCrdtUpdates: createGetCrdtMessagesForLww(componentId, timestamps, dirtyIterator, schema, data),\n updateFromCrdt: createUpdateLwwFromCrdt(componentId, timestamps, schema, data),\n dumpCrdtStateToBuffer: createDumpLwwFunctionFromCrdt(componentId, timestamps, schema, data)\n };\n}\n", "export const SYSTEMS_REGULAR_PRIORITY = 100e3;\nexport function SystemContainer() {\n const systems = [];\n function sort() {\n // TODO: systems with the same priority should always have the same stable order\n // add a \"counter\" to the System type to ensure that order\n systems.sort((a, b) => b.priority - a.priority);\n }\n function add(fn, priority, name) {\n const systemName = name ?? fn.name;\n if (systems.find((item) => item.fn === fn)) {\n throw new Error(`System ${JSON.stringify(systemName)} already added to the engine`);\n }\n systems.push({\n fn,\n priority,\n name: systemName\n });\n // TODO: replace this sort by an insertion in the right place\n sort();\n }\n function remove(selector) {\n let index = -1;\n if (typeof selector === 'string') {\n index = systems.findIndex((item) => item.name === selector);\n }\n else {\n index = systems.findIndex((item) => item.fn === selector);\n }\n if (index === -1) {\n return false;\n }\n systems.splice(index, 1);\n sort();\n return true;\n }\n return {\n add,\n remove,\n getSystems() {\n return systems;\n }\n };\n}\n", "import { ReadWriteByteBuffer } from '../serialization/ByteBuffer';\nimport { AppendValueOperation, CrdtMessageType } from '../serialization/crdt';\nimport { __DEV__ } from '../runtime/invariant';\nconst emptyReadonlySet = freezeSet(new Set());\nfunction frozenError() {\n throw new Error('The set is frozen');\n}\nfunction freezeSet(set) {\n ;\n set.add = frozenError;\n set.clear = frozenError;\n return set;\n}\nfunction sortByTimestamp(a, b) {\n return a.timestamp > b.timestamp ? 1 : -1;\n}\n/**\n * @internal\n */\nexport function createValueSetComponentDefinitionFromSchema(componentName, componentId, schema, options) {\n const data = new Map();\n const dirtyIterator = new Set();\n const queuedCommands = [];\n // only sort the array if the latest (N) element has a timestamp <= N-1\n function shouldSort(row) {\n const len = row.raw.length;\n if (len > 1 && row.raw[len - 1].timestamp <= row.raw[len - 2].timestamp) {\n return true;\n }\n return false;\n }\n function gotUpdated(entity) {\n const row = data.get(entity);\n /* istanbul ignore else */\n if (row) {\n if (shouldSort(row)) {\n row.raw.sort(sortByTimestamp);\n }\n while (row.raw.length > options.maxElements) {\n row.raw.shift();\n }\n const frozenSet = freezeSet(new Set(row?.raw.map(($) => $.value)));\n row.frozenSet = frozenSet;\n return frozenSet;\n }\n else {\n /* istanbul ignore next */\n return emptyReadonlySet;\n }\n }\n function append(entity, value) {\n let row = data.get(entity);\n if (!row) {\n row = { raw: [], frozenSet: emptyReadonlySet };\n data.set(entity, row);\n }\n const usedValue = schema.extend ? schema.extend(value) : value;\n const timestamp = options.timestampFunction(usedValue);\n if (__DEV__) {\n // only freeze the objects in dev mode to warn the developers because\n // it is an expensive operation\n Object.freeze(usedValue);\n }\n row.raw.push({ value: usedValue, timestamp });\n return { set: gotUpdated(entity), value: usedValue };\n }\n const ret = {\n get componentId() {\n return componentId;\n },\n get componentName() {\n return componentName;\n },\n get componentType() {\n // a getter is used here to prevent accidental changes\n return 1 /* ComponentType.GrowOnlyValueSet */;\n },\n schema,\n has(entity) {\n return data.has(entity);\n },\n entityDeleted(entity) {\n data.delete(entity);\n },\n get(entity) {\n const values = data.get(entity);\n if (values) {\n return values.frozenSet;\n }\n else {\n return emptyReadonlySet;\n }\n },\n addValue(entity, rawValue) {\n const { set, value } = append(entity, rawValue);\n dirtyIterator.add(entity);\n const buf = new ReadWriteByteBuffer();\n schema.serialize(value, buf);\n queuedCommands.push({\n componentId,\n data: buf.toBinary(),\n entityId: entity,\n timestamp: 0,\n type: CrdtMessageType.APPEND_VALUE\n });\n return set;\n },\n *iterator() {\n for (const [entity, component] of data) {\n yield [entity, component.frozenSet];\n }\n },\n *dirtyIterator() {\n for (const entity of dirtyIterator) {\n yield entity;\n }\n },\n getCrdtUpdates() {\n // return a copy of the commands, and then clear the local copy\n dirtyIterator.clear();\n return queuedCommands.splice(0, queuedCommands.length);\n },\n updateFromCrdt(_body) {\n if (_body.type === CrdtMessageType.APPEND_VALUE) {\n const buf = new ReadWriteByteBuffer(_body.data);\n append(_body.entityId, schema.deserialize(buf));\n }\n return [null, undefined];\n },\n dumpCrdtStateToBuffer: function (buffer, filterEntity) {\n for (const [entity, { raw }] of data) {\n if (filterEntity && !filterEntity(entity))\n continue;\n for (const it of raw) {\n const buf = new ReadWriteByteBuffer();\n schema.serialize(it.value, buf);\n AppendValueOperation.write(entity, 0, componentId, buf.toBinary(), buffer);\n }\n }\n }\n };\n return ret;\n}\n", "import * as components from '../../components';\nfunction* genEntityTree(entity, entities) {\n // This avoid infinite loop when there is a cyclic parenting\n if (!entities.has(entity))\n return;\n entities.delete(entity);\n for (const [_entity, value] of entities) {\n if (value.parent === entity) {\n yield* genEntityTree(_entity, entities);\n }\n }\n yield entity;\n}\n/**\n * Get an iterator of entities that follow a tree structure for a component\n * @public\n * @param engine - the engine running the entities\n * @param entity - the root entity of the tree\n * @param component - the parenting component to filter by\n * @returns An iterator of an array as [entity, entity2, ...]\n *\n * Example:\n * ```ts\n * const TreeComponent = engine.defineComponent('custom::TreeComponent', {\n * label: Schemas.String,\n * parent: Schemas.Entity\n * })\n *\n * for (const entity of getComponentEntityTree(engine, entity, TreeComponent)) {\n * // entity in the tree\n * }\n * ```\n */\nexport function getComponentEntityTree(engine, entity, component) {\n const entities = new Map(engine.getEntitiesWith(component));\n return genEntityTree(entity, entities);\n}\nfunction removeNetworkEntityChildrens(engine, parent) {\n const NetworkParent = components.NetworkParent(engine);\n const NetworkEntity = components.NetworkEntity(engine);\n // Remove parent\n engine.removeEntity(parent);\n // Remove childs\n const network = NetworkEntity.getOrNull(parent);\n if (network) {\n for (const [entity, parent] of engine.getEntitiesWith(NetworkParent)) {\n if (parent.entityId === network.entityId && parent.networkId === network.networkId) {\n removeNetworkEntityChildrens(engine, entity);\n }\n }\n }\n return;\n}\n/**\n * Remove all components of each entity in the tree made with Transform parenting\n * @param engine - the engine running the entities\n * @param firstEntity - the root entity of the tree\n * @public\n */\nexport function removeEntityWithChildren(engine, entity) {\n const Transform = components.Transform(engine);\n const NetworkEntity = components.NetworkEntity(engine);\n if (NetworkEntity.has(entity)) {\n return removeNetworkEntityChildrens(engine, entity);\n }\n for (const ent of getComponentEntityTree(engine, entity, Transform)) {\n engine.removeEntity(ent);\n }\n}\n", "import * as components from '../components';\nconst InputCommands = [\n 0 /* InputAction.IA_POINTER */,\n 1 /* InputAction.IA_PRIMARY */,\n 2 /* InputAction.IA_SECONDARY */,\n 4 /* InputAction.IA_FORWARD */,\n 5 /* InputAction.IA_BACKWARD */,\n 6 /* InputAction.IA_RIGHT */,\n 7 /* InputAction.IA_LEFT */,\n 8 /* InputAction.IA_JUMP */,\n 9 /* InputAction.IA_WALK */,\n 10 /* InputAction.IA_ACTION_3 */,\n 11 /* InputAction.IA_ACTION_4 */,\n 12 /* InputAction.IA_ACTION_5 */,\n 13 /* InputAction.IA_ACTION_6 */\n];\nconst InputStateUpdateSystemPriority = 1 << 20;\n/**\n * @internal\n */\nexport function createInputSystem(engine) {\n const PointerEventsResult = components.PointerEventsResult(engine);\n const globalState = {\n previousFrameMaxTimestamp: 0,\n currentFrameMaxTimestamp: 0,\n buttonState: new Map(),\n thisFrameCommands: []\n };\n function findLastAction(pointerEventType, inputAction, entity) {\n const ascendingTimestampIterator = PointerEventsResult.get(entity);\n for (const command of Array.from(ascendingTimestampIterator).reverse()) {\n if (command.button === inputAction && command.state === pointerEventType) {\n return command;\n }\n }\n }\n function* findCommandsByActionDescending(inputAction, entity) {\n const ascendingTimestampIterator = PointerEventsResult.get(entity);\n for (const command of Array.from(ascendingTimestampIterator).reverse()) {\n if (command.button === inputAction) {\n yield command;\n }\n }\n }\n function buttonStateUpdateSystem() {\n // first store the previous' frame timestamp\n let maxTimestamp = globalState.currentFrameMaxTimestamp;\n globalState.previousFrameMaxTimestamp = maxTimestamp;\n if (globalState.thisFrameCommands.length) {\n globalState.thisFrameCommands = [];\n }\n // then iterate over all new commands\n for (const [, commands] of engine.getEntitiesWith(PointerEventsResult)) {\n // TODO: adapt the gset component to have a cached \"reversed\" option by default\n const arrayCommands = Array.from(commands);\n for (let i = arrayCommands.length - 1; i >= 0; i--) {\n const command = arrayCommands[i];\n if (command.timestamp > maxTimestamp) {\n maxTimestamp = command.timestamp;\n }\n if (command.timestamp > globalState.previousFrameMaxTimestamp) {\n globalState.thisFrameCommands.push(command);\n }\n if (command.state === 0 /* PointerEventType.PET_UP */ || command.state === 1 /* PointerEventType.PET_DOWN */) {\n const prevCommand = globalState.buttonState.get(command.button);\n if (!prevCommand || command.timestamp > prevCommand.timestamp) {\n globalState.buttonState.set(command.button, command);\n }\n else {\n // since we are iterating a descending array, we can early finish the\n // loop\n break;\n }\n }\n }\n }\n // update current frame's max timestamp\n globalState.currentFrameMaxTimestamp = maxTimestamp;\n }\n engine.addSystem(buttonStateUpdateSystem, InputStateUpdateSystemPriority, '@dcl/ecs#inputSystem');\n function timestampIsCurrentFrame(timestamp) {\n if (timestamp > globalState.previousFrameMaxTimestamp && timestamp <= globalState.currentFrameMaxTimestamp) {\n return true;\n }\n else {\n return false;\n }\n }\n function getClick(inputAction, entity) {\n if (inputAction !== 3 /* InputAction.IA_ANY */) {\n return findClick(inputAction, entity);\n }\n for (const input of InputCommands) {\n const cmd = findClick(input, entity);\n if (cmd)\n return cmd;\n }\n return null;\n }\n function findClick(inputAction, entity) {\n let down = null;\n let up = null;\n // We search the last UP & DOWN command sorted by timestamp descending\n for (const it of findCommandsByActionDescending(inputAction, entity)) {\n if (!up) {\n if (it.state === 0 /* PointerEventType.PET_UP */) {\n up = it;\n continue;\n }\n }\n else if (!down) {\n if (it.state === 1 /* PointerEventType.PET_DOWN */) {\n down = it;\n break;\n }\n }\n }\n if (!up || !down)\n return null;\n // If the DOWN command has happen before the UP commands, it means that that a clicked has happen\n if (down.timestamp < up.timestamp && timestampIsCurrentFrame(up.timestamp)) {\n return { up, down };\n }\n return null;\n }\n function getInputCommandFromEntity(inputAction, pointerEventType, entity) {\n if (inputAction !== 3 /* InputAction.IA_ANY */) {\n return findInputCommand(inputAction, pointerEventType, entity);\n }\n for (const input of InputCommands) {\n const cmd = findInputCommand(input, pointerEventType, entity);\n if (cmd)\n return cmd;\n }\n return null;\n }\n function getInputCommand(inputAction, pointerEventType, entity) {\n if (entity) {\n return getInputCommandFromEntity(inputAction, pointerEventType, entity);\n }\n else {\n for (const command of globalState.thisFrameCommands) {\n if ((command.button === inputAction || inputAction === 3 /* InputAction.IA_ANY */) &&\n command.state === pointerEventType) {\n return command;\n }\n }\n return null;\n }\n }\n function findInputCommand(inputAction, pointerEventType, entity) {\n // We search the last pointer Event command sorted by timestamp\n const command = findLastAction(pointerEventType, inputAction, entity);\n if (!command)\n return null;\n if (timestampIsCurrentFrame(command.timestamp)) {\n return command;\n }\n else {\n return null;\n }\n }\n // returns true if there was a DOWN (in any past frame), and then an UP in the last frame\n function isClicked(inputAction, entity) {\n return getClick(inputAction, entity) !== null;\n }\n // returns true if the provided last action was triggered in the last frame\n function isTriggered(inputAction, pointerEventType, entity) {\n if (entity) {\n const command = findLastAction(pointerEventType, inputAction, entity);\n return (command && timestampIsCurrentFrame(command.timestamp)) || false;\n }\n else {\n for (const command of globalState.thisFrameCommands) {\n if ((command.button === inputAction || inputAction === 3 /* InputAction.IA_ANY */) &&\n command.state === pointerEventType) {\n return true;\n }\n }\n return false;\n }\n }\n // returns the global state of the input. This global state is updated from the system\n function isPressed(inputAction) {\n return globalState.buttonState.get(inputAction)?.state === 1 /* PointerEventType.PET_DOWN */;\n }\n return {\n isPressed,\n getClick,\n getInputCommand,\n isClicked,\n isTriggered\n };\n}\n", "/**\n * Component types are used to pick the wire protocol and the conflict resolution algorithm\n * @public\n */\nexport var ComponentType;\n(function (ComponentType) {\n ComponentType[ComponentType[\"LastWriteWinElementSet\"] = 0] = \"LastWriteWinElementSet\";\n ComponentType[ComponentType[\"GrowOnlyValueSet\"] = 1] = \"GrowOnlyValueSet\";\n})(ComponentType || (ComponentType = {}));\n", "import * as components from '../components';\nimport { componentNumberFromName } from '../components/component-number';\nimport { checkNotThenable } from '../runtime/invariant';\nimport { Schemas } from '../schemas';\nimport { crdtSceneSystem } from '../systems/crdt';\nimport { createComponentDefinitionFromSchema } from './lww-element-set-component-definition';\nimport { EntityContainer } from './entity';\nimport { SystemContainer, SYSTEMS_REGULAR_PRIORITY } from './systems';\nimport { createValueSetComponentDefinitionFromSchema } from './grow-only-value-set-component-definition';\nimport { removeEntityWithChildren as removeEntityWithChildrenEngine } from '../runtime/helpers/tree';\nimport { NetworkEntity } from '..';\nexport * from './input';\nexport * from './readonly';\nexport * from './types';\nfunction preEngine() {\n const entityContainer = EntityContainer();\n const componentsDefinition = new Map();\n const systems = SystemContainer();\n let sealed = false;\n function addSystem(fn, priority = SYSTEMS_REGULAR_PRIORITY, name) {\n systems.add(fn, priority, name);\n }\n function removeSystem(selector) {\n return systems.remove(selector);\n }\n function addEntity() {\n const entity = entityContainer.generateEntity();\n return entity;\n }\n function removeEntity(entity) {\n for (const [, component] of componentsDefinition) {\n // TODO: hack for the moment. It should be enough to delete the entity, but the renderer is not cleaning the components.\n // So we still need the NetworkEntity to forward this message to the SyncTransport.\n if (component.componentId === NetworkEntity.componentId)\n continue;\n component.entityDeleted(entity, true);\n }\n return entityContainer.removeEntity(entity);\n }\n function removeEntityWithChildren(entity) {\n return removeEntityWithChildrenEngine({ removeEntity, defineComponentFromSchema, getEntitiesWith, defineComponent }, entity);\n }\n function registerComponentDefinition(componentName, component) {\n /* istanbul ignore next */\n if (sealed)\n throw new Error('Engine is already sealed. No components can be added at this stage');\n const componentId = componentNumberFromName(componentName);\n const prev = componentsDefinition.get(componentId);\n if (prev) {\n throw new Error(`Component number ${componentId} was already registered.`);\n }\n /* istanbul ignore next */\n if (component.componentName !== componentName) {\n throw new Error(`Component name doesn't match componentDefinition.componentName ${componentName} != ${component.componentName}`);\n }\n /* istanbul ignore next */\n if (component.componentId !== componentId) {\n throw new Error(`Component number doesn't match componentDefinition.componentId ${componentId} != ${component.componentId}`);\n }\n componentsDefinition.set(componentId, component);\n return component;\n }\n function defineComponentFromSchema(componentName, schema) {\n const componentId = componentNumberFromName(componentName);\n const prev = componentsDefinition.get(componentId);\n if (prev) {\n // TODO: assert spec === prev.spec\n return prev;\n }\n /* istanbul ignore next */\n if (sealed)\n throw new Error('Engine is already sealed. No components can be added at this stage');\n const newComponent = createComponentDefinitionFromSchema(componentName, componentId, schema);\n componentsDefinition.set(componentId, newComponent);\n return newComponent;\n }\n function defineValueSetComponentFromSchema(componentName, schema, options) {\n const componentId = componentNumberFromName(componentName);\n const prev = componentsDefinition.get(componentId);\n if (prev) {\n // TODO: assert spec === prev.spec\n return prev;\n }\n /* istanbul ignore next */\n if (sealed)\n throw new Error('Engine is already sealed. No components can be added at this stage');\n const newComponent = createValueSetComponentDefinitionFromSchema(componentName, componentId, schema, options);\n componentsDefinition.set(componentId, newComponent);\n return newComponent;\n }\n function defineComponent(componentName, mapSpec, constructorDefault) {\n const componentId = componentNumberFromName(componentName);\n const prev = componentsDefinition.get(componentId);\n if (prev) {\n // TODO: assert spec === prev.spec\n return prev;\n }\n if (sealed)\n throw new Error('Engine is already sealed. No components can be added at this stage');\n const schemaSpec = Schemas.Map(mapSpec, constructorDefault);\n const def = createComponentDefinitionFromSchema(componentName, componentId, schemaSpec);\n const newComponent = {\n ...def,\n create(entity, val) {\n return def.create(entity, val);\n },\n createOrReplace(entity, val) {\n return def.createOrReplace(entity, val);\n }\n };\n componentsDefinition.set(componentId, newComponent);\n return newComponent;\n }\n function getComponent(componentIdOrName) {\n const componentId = typeof componentIdOrName === 'number' ? componentIdOrName : componentNumberFromName(componentIdOrName);\n const component = componentsDefinition.get(componentId);\n if (!component) {\n throw new Error(`Component ${componentId} not found. You need to declare the components at the beginnig of the engine declaration`);\n }\n return component;\n }\n function getComponentOrNull(componentIdOrName) {\n const componentId = typeof componentIdOrName === 'number' ? componentIdOrName : componentNumberFromName(componentIdOrName);\n return (componentsDefinition.get(componentId) ??\n /* istanbul ignore next */\n null);\n }\n function* getEntitiesWith(...components) {\n for (const [entity, ...groupComp] of getComponentDefGroup(...components)) {\n yield [entity, ...groupComp.map((c) => c.get(entity))];\n }\n }\n function getEntityOrNullByName(value) {\n const LabelComponent = components.Name({ defineComponent });\n for (const [entity, name] of getEntitiesWith(LabelComponent)) {\n if (name.value === value)\n return entity;\n }\n return null;\n }\n function* getComponentDefGroup(...args) {\n const [firstComponentDef, ...componentDefinitions] = args;\n for (const [entity] of firstComponentDef.iterator()) {\n let matches = true;\n for (const componentDef of componentDefinitions) {\n if (!componentDef.has(entity)) {\n matches = false;\n break;\n }\n }\n if (matches) {\n yield [entity, ...args];\n }\n }\n }\n function getSystems() {\n return systems.getSystems();\n }\n function componentsIter() {\n return componentsDefinition.values();\n }\n function removeComponentDefinition(componentIdOrName) {\n if (sealed)\n throw new Error('Engine is already sealed. No components can be removed at this stage');\n const componentId = typeof componentIdOrName === 'number' ? componentIdOrName : componentNumberFromName(componentIdOrName);\n componentsDefinition.delete(componentId);\n }\n components.Transform({ defineComponentFromSchema });\n function seal() {\n if (!sealed) {\n sealed = true;\n }\n }\n return {\n addEntity,\n removeEntity,\n removeEntityWithChildren,\n addSystem,\n getSystems,\n removeSystem,\n defineComponent,\n defineComponentFromSchema,\n defineValueSetComponentFromSchema,\n getEntitiesWith,\n getComponent,\n getComponentOrNull: getComponentOrNull,\n getEntityOrNullByName,\n removeComponentDefinition,\n registerComponentDefinition,\n entityContainer,\n componentsIter,\n seal\n };\n}\n/**\n * Internal constructor of new engines, this is an internal API\n * @public\n * @deprecated Prevent manual usage prefer \"engine\" for scene development\n */\nexport function Engine(options) {\n const partialEngine = preEngine();\n const crdtSystem = crdtSceneSystem(partialEngine, options?.onChangeFunction || null);\n async function update(dt) {\n await crdtSystem.receiveMessages();\n for (const system of partialEngine.getSystems()) {\n const ret = system.fn(dt);\n checkNotThenable(ret, `A system (${system.name || 'anonymous'}) returned a thenable. Systems cannot be async functions. Documentation: https://dcl.gg/sdk/sync-systems`);\n }\n // get the deleted entities to send the DeleteEntity CRDT commands\n const deletedEntites = partialEngine.entityContainer.releaseRemovedEntities();\n await crdtSystem.sendMessages(deletedEntites);\n }\n return {\n addEntity: partialEngine.addEntity,\n removeEntity: partialEngine.removeEntity,\n removeEntityWithChildren: partialEngine.removeEntityWithChildren,\n addSystem: partialEngine.addSystem,\n removeSystem: partialEngine.removeSystem,\n defineComponent: partialEngine.defineComponent,\n defineComponentFromSchema: partialEngine.defineComponentFromSchema,\n defineValueSetComponentFromSchema: partialEngine.defineValueSetComponentFromSchema,\n registerComponentDefinition: partialEngine.registerComponentDefinition,\n getEntitiesWith: partialEngine.getEntitiesWith,\n getComponent: partialEngine.getComponent,\n getComponentOrNull: partialEngine.getComponentOrNull,\n removeComponentDefinition: partialEngine.removeComponentDefinition,\n componentsIter: partialEngine.componentsIter,\n seal: partialEngine.seal,\n getEntityOrNullByName: partialEngine.getEntityOrNullByName,\n update,\n RootEntity: 0,\n PlayerEntity: 1,\n CameraEntity: 2,\n getEntityState: partialEngine.entityContainer.getEntityState,\n addTransport: crdtSystem.addTransport,\n entityContainer: partialEngine.entityContainer\n };\n}\n", "function getAndClean(value) {\n const messagesToProcess = Array.from(value);\n value.length = 0;\n return messagesToProcess;\n}\n/**\n * @internal\n */\nexport function createTaskSystem(engine) {\n const tasks = [];\n async function runTask(task) {\n try {\n const resp = await task();\n return resp;\n }\n catch (e) {\n console.error(e);\n }\n }\n function executeTasks() {\n for (const task of getAndClean(tasks)) {\n runTask(task).catch(console.error);\n }\n }\n engine.addSystem(executeTasks);\n return function (task) {\n tasks.push(task);\n };\n}\n", "import * as components from '../components';\nimport { ReadWriteByteBuffer } from '../serialization/ByteBuffer';\nimport { dataCompare } from './crdt/utils';\n/**\n * @internal\n * @returns tween helper to be used on the scene\n */\nexport function createTweenSystem(engine) {\n const Tween = components.Tween(engine);\n const TweenState = components.TweenState(engine);\n const TweenSequence = components.TweenSequence(engine);\n const cache = new Map();\n function isCompleted(entity) {\n const tweenState = TweenState.getOrNull(entity);\n const tween = Tween.getOrNull(entity);\n const tweenCache = cache.get(entity);\n if (!tweenState || !tween)\n return false;\n /* istanbul ignore next */\n if (\n // Renderer notified that the tween is completed\n (tweenChanged(entity) || tweenState.state === 1 /* TweenStateStatus.TS_COMPLETED */) &&\n // Avoid sending isCompleted multiple times\n !tweenCache?.completed &&\n // Amount of frames needed to consider a tween completed\n (tweenCache?.frames ?? 0) > 2) {\n return true;\n }\n return false;\n }\n function tweenChanged(entity) {\n const currentTween = Tween.getOrNull(entity);\n const prevTween = cache.get(entity)?.tween;\n /* istanbul ignore next */\n if ((currentTween && !prevTween) || (!currentTween && prevTween)) {\n return true;\n }\n const currentBuff = new ReadWriteByteBuffer();\n Tween.schema.serialize(currentTween, currentBuff);\n const equal = dataCompare(currentBuff.toBinary(), prevTween);\n return equal;\n }\n const restartTweens = [];\n // Logic for sequence tweens\n engine.addSystem(() => {\n for (const restart of restartTweens) {\n restart();\n }\n restartTweens.length = 0;\n for (const [entity, tween] of engine.getEntitiesWith(Tween)) {\n if (tweenChanged(entity)) {\n const buffer = new ReadWriteByteBuffer();\n Tween.schema.serialize(tween, buffer);\n cache.set(entity, {\n tween: buffer.toBinary(),\n frames: 0,\n completed: false,\n changed: true\n });\n continue;\n }\n const tweenCache = cache.get(entity);\n tweenCache.frames += 1;\n tweenCache.changed = false;\n if (isCompleted(entity)) {\n // Reset tween frames.\n tweenCache.frames = 0;\n // set the tween completed to avoid calling this again for the same tween\n tweenCache.completed = true;\n const tweenSequence = TweenSequence.getOrNull(entity);\n if (!tweenSequence)\n continue;\n const { sequence } = tweenSequence;\n if (sequence && sequence.length) {\n const [nextTweenSequence, ...otherTweens] = sequence;\n Tween.createOrReplace(entity, nextTweenSequence);\n const mutableTweenHelper = TweenSequence.getMutable(entity);\n mutableTweenHelper.sequence = otherTweens;\n if (tweenSequence.loop === 0 /* TweenLoop.TL_RESTART */) {\n mutableTweenHelper.sequence.push(tween);\n }\n }\n else if (tweenSequence.loop === 1 /* TweenLoop.TL_YOYO */) {\n Tween.createOrReplace(entity, backwardsTween(tween));\n }\n else if (tweenSequence.loop === 0 /* TweenLoop.TL_RESTART */) {\n Tween.deleteFrom(entity);\n cache.delete(entity);\n restartTweens.push(() => {\n Tween.createOrReplace(entity, tween);\n });\n }\n }\n }\n }, Number.NEGATIVE_INFINITY);\n function backwardsTween(tween) {\n if (tween.mode?.$case === 'move' && tween.mode.move) {\n return { ...tween, mode: { ...tween.mode, move: { start: tween.mode.move.end, end: tween.mode.move.start } } };\n }\n if (tween.mode?.$case === 'rotate' && tween.mode.rotate) {\n return {\n ...tween,\n mode: { ...tween.mode, rotate: { start: tween.mode.rotate.end, end: tween.mode.rotate.start } }\n };\n }\n if (tween.mode?.$case === 'scale' && tween.mode.scale) {\n return { ...tween, mode: { ...tween.mode, scale: { start: tween.mode.scale.end, end: tween.mode.scale.start } } };\n }\n /* istanbul ignore next */\n throw new Error('Invalid tween');\n }\n return {\n // This event is fired only once per tween\n tweenCompleted: isCompleted\n };\n}\n", "/**\n * @alpha * This file initialization is an alpha one. This is based on the old-ecs\n * init and it'll be changing.\n */\nimport { Engine } from '../../engine';\nimport { createTaskSystem } from '../../systems/async-task';\nimport { createPointerEventsSystem } from '../../systems/events';\nimport { createInputSystem } from './../../engine/input';\nimport { createRaycastSystem } from '../../systems/raycast';\nimport { createVideoEventsSystem } from '../../systems/videoEvents';\nimport { createTweenSystem } from '../../systems/tween';\n/**\n * @public\n * The engine is the part of the scene that sits in the middle and manages all of the other parts.\n * It determines what entities are rendered and how players interact with them.\n * It also coordinates what functions from systems are executed and when.\n *\n * @example\n * import { engine } from '@dcl/sdk/ecs'\n * const entity = engine.addEntity()\n * engine.addSystem(someSystemFunction)\n *\n */\nexport const engine = /* @__PURE__ */ Engine();\n/**\n * @public\n * Input system manager. Check for button events\n * @example\n * inputSystem.isTriggered: Returns true if an input action ocurred since the last tick.\n * inputSystem.isPressed: Returns true if an input is currently being pressed down. It will return true on every tick until the button goes up again.\n * inputSystem.getInputCommand: Returns an object with data about the input action.\n */\nexport const inputSystem = /* @__PURE__ */ createInputSystem(engine);\n/**\n * @public\n * Register callback functions to a particular entity on input events.\n */\nexport const pointerEventsSystem = /* @__PURE__ */ createPointerEventsSystem(engine, inputSystem);\n/**\n * @public\n * Register callback functions to a particular entity on raycast results.\n */\nexport const raycastSystem = /* @__PURE__ */ createRaycastSystem(engine);\n/**\n * @public\n * Register callback functions to a particular entity on video events.\n */\nexport const videoEventsSystem = /* @__PURE__ */ createVideoEventsSystem(engine);\n/**\n * @public\n * Register callback functions to a particular entity on video events.\n */\nexport const tweenSystem = createTweenSystem(engine);\n/**\n * @public\n * Runs an async function\n */\nexport const executeTask = /* @__PURE__ */ createTaskSystem(engine);\n", "import { engine } from '../../runtime/initialization';\nimport * as components from './index.gen';\nexport * from './index.gen';\n/** @public */ export const AudioSource = /* @__PURE__ */ components.AudioSource(engine);\n/** @public */ export const AudioStream = /* @__PURE__ */ components.AudioStream(engine);\n/** @public */ export const AvatarAttach = /* @__PURE__ */ components.AvatarAttach(engine);\n/** @public */ export const AvatarModifierArea = /* @__PURE__ */ components.AvatarModifierArea(engine);\n/** @public */ export const AvatarShape = /* @__PURE__ */ components.AvatarShape(engine);\n/** @public */ export const Billboard = /* @__PURE__ */ components.Billboard(engine);\n/** @public */ export const CameraMode = /* @__PURE__ */ components.CameraMode(engine);\n/** @public */ export const CameraModeArea = /* @__PURE__ */ components.CameraModeArea(engine);\n/** @public */ export const EngineInfo = /* @__PURE__ */ components.EngineInfo(engine);\n/** @public */ export const GltfContainer = /* @__PURE__ */ components.GltfContainer(engine);\n/** @public */ export const GltfContainerLoadingState = /* @__PURE__ */ components.GltfContainerLoadingState(engine);\n/** @public */ export const NftShape = /* @__PURE__ */ components.NftShape(engine);\n/** @public */ export const PointerEvents = /* @__PURE__ */ components.PointerEvents(engine);\n/** @public */ export const PointerEventsResult = /* @__PURE__ */ components.PointerEventsResult(engine);\n/** @public */ export const PointerLock = /* @__PURE__ */ components.PointerLock(engine);\n/** @public */ export const Raycast = /* @__PURE__ */ components.Raycast(engine);\n/** @public */ export const RaycastResult = /* @__PURE__ */ components.RaycastResult(engine);\n/** @public */ export const TextShape = /* @__PURE__ */ components.TextShape(engine);\n/** @public */ export const TweenSequence = /* @__PURE__ */ components.TweenSequence(engine);\n/** @public */ export const TweenState = /* @__PURE__ */ components.TweenState(engine);\n/** @public */ export const UiBackground = /* @__PURE__ */ components.UiBackground(engine);\n/** @public */ export const UiCanvasInformation = /* @__PURE__ */ components.UiCanvasInformation(engine);\n/** @public */ export const UiDropdown = /* @__PURE__ */ components.UiDropdown(engine);\n/** @public */ export const UiDropdownResult = /* @__PURE__ */ components.UiDropdownResult(engine);\n/** @public */ export const UiInput = /* @__PURE__ */ components.UiInput(engine);\n/** @public */ export const UiInputResult = /* @__PURE__ */ components.UiInputResult(engine);\n/** @public */ export const UiText = /* @__PURE__ */ components.UiText(engine);\n/** @public */ export const UiTransform = /* @__PURE__ */ components.UiTransform(engine);\n/** @public */ export const VideoEvent = /* @__PURE__ */ components.VideoEvent(engine);\n/** @public */ export const VideoPlayer = /* @__PURE__ */ components.VideoPlayer(engine);\n/** @public */ export const VisibilityComponent = /* @__PURE__ */ components.VisibilityComponent(engine);\n", "/* eslint-disable */\nconst protobufPackageSarasa = \"decentraland.sdk.components.common\";\n/**\n * @public\n */\nexport var CameraType;\n(function (CameraType) {\n CameraType[CameraType[\"CT_FIRST_PERSON\"] = 0] = \"CT_FIRST_PERSON\";\n CameraType[CameraType[\"CT_THIRD_PERSON\"] = 1] = \"CT_THIRD_PERSON\";\n /** CT_CINEMATIC - controlled by the scene */\n CameraType[CameraType[\"CT_CINEMATIC\"] = 2] = \"CT_CINEMATIC\";\n})(CameraType || (CameraType = {}));\n", "/* eslint-disable */\nconst protobufPackageSarasa = \"decentraland.sdk.components.common\";\n/**\n * @public\n */\nexport var InputAction;\n(function (InputAction) {\n InputAction[InputAction[\"IA_POINTER\"] = 0] = \"IA_POINTER\";\n InputAction[InputAction[\"IA_PRIMARY\"] = 1] = \"IA_PRIMARY\";\n InputAction[InputAction[\"IA_SECONDARY\"] = 2] = \"IA_SECONDARY\";\n InputAction[InputAction[\"IA_ANY\"] = 3] = \"IA_ANY\";\n InputAction[InputAction[\"IA_FORWARD\"] = 4] = \"IA_FORWARD\";\n InputAction[InputAction[\"IA_BACKWARD\"] = 5] = \"IA_BACKWARD\";\n InputAction[InputAction[\"IA_RIGHT\"] = 6] = \"IA_RIGHT\";\n InputAction[InputAction[\"IA_LEFT\"] = 7] = \"IA_LEFT\";\n InputAction[InputAction[\"IA_JUMP\"] = 8] = \"IA_JUMP\";\n InputAction[InputAction[\"IA_WALK\"] = 9] = \"IA_WALK\";\n InputAction[InputAction[\"IA_ACTION_3\"] = 10] = \"IA_ACTION_3\";\n InputAction[InputAction[\"IA_ACTION_4\"] = 11] = \"IA_ACTION_4\";\n InputAction[InputAction[\"IA_ACTION_5\"] = 12] = \"IA_ACTION_5\";\n InputAction[InputAction[\"IA_ACTION_6\"] = 13] = \"IA_ACTION_6\";\n})(InputAction || (InputAction = {}));\n/** PointerEventType is a kind of interaction that can be detected. */\n/**\n * @public\n */\nexport var PointerEventType;\n(function (PointerEventType) {\n PointerEventType[PointerEventType[\"PET_UP\"] = 0] = \"PET_UP\";\n PointerEventType[PointerEventType[\"PET_DOWN\"] = 1] = \"PET_DOWN\";\n PointerEventType[PointerEventType[\"PET_HOVER_ENTER\"] = 2] = \"PET_HOVER_ENTER\";\n PointerEventType[PointerEventType[\"PET_HOVER_LEAVE\"] = 3] = \"PET_HOVER_LEAVE\";\n})(PointerEventType || (PointerEventType = {}));\n", "/* eslint-disable */\nconst protobufPackageSarasa = \"decentraland.sdk.components.common\";\n/**\n * @public\n */\nexport var LoadingState;\n(function (LoadingState) {\n LoadingState[LoadingState[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n LoadingState[LoadingState[\"LOADING\"] = 1] = \"LOADING\";\n LoadingState[LoadingState[\"NOT_FOUND\"] = 2] = \"NOT_FOUND\";\n LoadingState[LoadingState[\"FINISHED_WITH_ERROR\"] = 3] = \"FINISHED_WITH_ERROR\";\n LoadingState[LoadingState[\"FINISHED\"] = 4] = \"FINISHED\";\n})(LoadingState || (LoadingState = {}));\n", "/* eslint-disable */\nconst protobufPackageSarasa = \"decentraland.sdk.components.common\";\n/**\n * @public\n */\nexport var TextAlignMode;\n(function (TextAlignMode) {\n TextAlignMode[TextAlignMode[\"TAM_TOP_LEFT\"] = 0] = \"TAM_TOP_LEFT\";\n TextAlignMode[TextAlignMode[\"TAM_TOP_CENTER\"] = 1] = \"TAM_TOP_CENTER\";\n TextAlignMode[TextAlignMode[\"TAM_TOP_RIGHT\"] = 2] = \"TAM_TOP_RIGHT\";\n TextAlignMode[TextAlignMode[\"TAM_MIDDLE_LEFT\"] = 3] = \"TAM_MIDDLE_LEFT\";\n TextAlignMode[TextAlignMode[\"TAM_MIDDLE_CENTER\"] = 4] = \"TAM_MIDDLE_CENTER\";\n TextAlignMode[TextAlignMode[\"TAM_MIDDLE_RIGHT\"] = 5] = \"TAM_MIDDLE_RIGHT\";\n TextAlignMode[TextAlignMode[\"TAM_BOTTOM_LEFT\"] = 6] = \"TAM_BOTTOM_LEFT\";\n TextAlignMode[TextAlignMode[\"TAM_BOTTOM_CENTER\"] = 7] = \"TAM_BOTTOM_CENTER\";\n TextAlignMode[TextAlignMode[\"TAM_BOTTOM_RIGHT\"] = 8] = \"TAM_BOTTOM_RIGHT\";\n})(TextAlignMode || (TextAlignMode = {}));\n/**\n * @public\n */\nexport var Font;\n(function (Font) {\n Font[Font[\"F_SANS_SERIF\"] = 0] = \"F_SANS_SERIF\";\n Font[Font[\"F_SERIF\"] = 1] = \"F_SERIF\";\n Font[Font[\"F_MONOSPACE\"] = 2] = \"F_MONOSPACE\";\n})(Font || (Font = {}));\n", "import { Schemas } from '../schemas';\n/**\n * @public\n * @deprecated composite is not being supported so far, please do not use this feature\n */\nexport function getCompositeRootComponent(engine) {\n const component = engine.getComponentOrNull('composite::root');\n if (component) {\n return component;\n }\n return engine.defineComponent('composite::root', {\n src: Schemas.String,\n entities: Schemas.Array(Schemas.Map({\n src: Schemas.Entity,\n dest: Schemas.Entity\n }))\n });\n}\n", "const currentWorkingDir = '/';\n/**\n * The functions `normalizeStringPosix`, `dirname` and `resolve`\n * were extracted from package @browserify/path\n */\n/* istanbul ignore next */\nfunction normalizeStringPosix(path, allowAboveRoot = false) {\n let res = '';\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let code;\n for (let i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47; /*/*/\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n }\n else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 ||\n lastSegmentLength !== 2 ||\n res.charCodeAt(res.length - 1) !== 46 /*.*/ ||\n res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n }\n else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n }\n else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n }\n else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n }\n else {\n dots = -1;\n }\n }\n return res;\n}\n/* istanbul ignore next */\nexport function resolve(...args) {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n let cwd;\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n let path;\n if (i >= 0)\n path = args[i];\n else {\n if (cwd === undefined)\n cwd = currentWorkingDir;\n path = cwd;\n }\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47; /*/*/\n }\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n }\n else if (resolvedPath.length > 0) {\n return resolvedPath;\n }\n else {\n return '.';\n }\n}\n/* istanbul ignore next */\nexport function dirname(path) {\n if (path.length === 0)\n return '.';\n let code = path.charCodeAt(0);\n const hasRoot = code === 47; /*/*/\n let end = -1;\n let matchedSlash = true;\n for (let i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n }\n else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n if (end === -1)\n return hasRoot ? '/' : '.';\n if (hasRoot && end === 1)\n return '//';\n return path.slice(0, end);\n}\nexport function resolveComposite(path, cwd) {\n const absolutePath = path.startsWith('.') ? resolve(cwd, path) : resolve(path);\n return absolutePath.substring(1);\n}\n", "import { componentDefinitionByName } from '../components';\nimport { componentNumberFromName } from '../components/component-number';\nimport { Schemas } from '../schemas';\nimport { ReadWriteByteBuffer } from '../serialization/ByteBuffer';\nimport { getCompositeRootComponent } from './components';\nimport * as path from './path';\n/** @public */\n/* @__PURE__ */\nexport var EntityMappingMode;\n(function (EntityMappingMode) {\n EntityMappingMode[EntityMappingMode[\"EMM_NONE\"] = 0] = \"EMM_NONE\";\n EntityMappingMode[EntityMappingMode[\"EMM_NEXT_AVAILABLE\"] = 1] = \"EMM_NEXT_AVAILABLE\";\n EntityMappingMode[EntityMappingMode[\"EMM_DIRECT_MAPPING\"] = 2] = \"EMM_DIRECT_MAPPING\";\n})(EntityMappingMode || (EntityMappingMode = {}));\n/**\n * Return the component value from composite data\n * @internal\n */\nexport function getComponentValue(componentDefinition, component) {\n if (component.data?.$case === 'json') {\n return component.data.json;\n }\n else {\n return componentDefinition.schema.deserialize(new ReadWriteByteBuffer(component.data?.binary));\n }\n}\n/**\n * Return the component definition from composite info\n * @internal\n */\nexport function getComponentDefinition(engine, component) {\n const existingComponentDefinition = engine.getComponentOrNull(component.name);\n if (!existingComponentDefinition) {\n if (component.name.startsWith('core::')) {\n if (component.name in componentDefinitionByName) {\n return componentDefinitionByName[component.name](engine);\n }\n else {\n throw new Error(`The core component ${component.name} was not found.`);\n }\n }\n else if (component.jsonSchema) {\n return engine.defineComponentFromSchema(component.name, Schemas.fromJson(component.jsonSchema));\n }\n else {\n throw new Error(`${component.name} is not defined and there is no schema to define it.`);\n }\n }\n else {\n return existingComponentDefinition;\n }\n}\n/**\n * Return the entity mapping or fail if there is no more\n * @internal\n */\nexport function getEntityMapping(engine, compositeEntity, mappedEntities, { entityMapping }) {\n const existingEntity = mappedEntities.get(compositeEntity);\n if (existingEntity) {\n return existingEntity;\n }\n if (entityMapping?.type === EntityMappingMode.EMM_DIRECT_MAPPING) {\n const entity = entityMapping.getCompositeEntity(compositeEntity);\n mappedEntities.set(compositeEntity, entity);\n return entity;\n }\n // This function in runtime can be just `engine.addEntity()`\n const newEntity = entityMapping?.type === EntityMappingMode.EMM_NEXT_AVAILABLE\n ? entityMapping.getNextAvailableEntity()\n : engine.addEntity();\n if (newEntity === null) {\n throw new Error('There is no more entities to allocate');\n }\n mappedEntities.set(compositeEntity, newEntity);\n return newEntity;\n}\n/**\n * @internal\n */\n/* @__PURE__ */\nexport function instanceComposite(engine, compositeResource, compositeProvider, options) {\n const { rootEntity, alreadyRequestedSrc: optionalAlreadyRequestedSrc, entityMapping } = options;\n const alreadyRequestedSrc = optionalAlreadyRequestedSrc || new Set();\n const compositeDirectoryPath = path.dirname(path.resolve(compositeResource.src));\n const TransformComponentNumber = componentNumberFromName('core::Transform');\n const CompositeRootComponent = getCompositeRootComponent(engine);\n // Key => EntityNumber from the composite\n // Value => EntityNumber in current engine\n const mappedEntities = new Map();\n const getCompositeEntity = (compositeEntity) => getEntityMapping(engine, compositeEntity, mappedEntities, options);\n // ## 1 ##\n // First entity that I want to map, the root entity from the composite to the target entity in the engine\n // If there is no `rootEntity` passed, we assign one from `getNextAvailableEntity`\n const compositeRootEntity = rootEntity ?? getCompositeEntity(0);\n if (rootEntity) {\n mappedEntities.set(0, rootEntity);\n }\n // ## 2 ##\n // If there are more composite inside this one, we instance first.\n // => This is not only a copy, we need to instance. Otherwise, we'd be missing that branches\n // => TODO: in the future, the instanciation is first, then the overides (to parameterize Composite, e.g. house with different wall colors)\n const childrenComposite = compositeResource.composite.components.find((item) => item.name === CompositeRootComponent.componentName);\n if (childrenComposite) {\n for (const [childCompositeEntity, compositeRawData] of childrenComposite.data) {\n const childComposite = getComponentValue(CompositeRootComponent, compositeRawData);\n const childCompositePath = path.resolveComposite(childComposite.src, compositeDirectoryPath);\n const childCompositeResource = compositeProvider.getCompositeOrNull(childCompositePath);\n const targetEntity = getCompositeEntity(childCompositeEntity);\n if (childCompositeResource) {\n if (alreadyRequestedSrc.has(childCompositeResource.src) ||\n childCompositeResource.src === compositeResource.src) {\n throw new Error(`Composite ${compositeResource.src} has a recursive instanciation while try to instance ${childCompositeResource.src}. Previous instances: ${alreadyRequestedSrc.toString()}`);\n }\n instanceComposite(engine, childCompositeResource, compositeProvider, {\n rootEntity: targetEntity,\n alreadyRequestedSrc: new Set(alreadyRequestedSrc).add(childCompositeResource.src),\n entityMapping: entityMapping?.type === EntityMappingMode.EMM_NEXT_AVAILABLE ? entityMapping : undefined\n });\n }\n }\n }\n // ## 3 ##\n // Then, we copy the all rest of the components (skipping the Composite ones)\n for (const component of compositeResource.composite.components) {\n // We already instanced the composite\n if (component.name === CompositeRootComponent.componentName)\n continue;\n // ## 3a ##\n // We find the component definition\n const componentDefinition = getComponentDefinition(engine, component);\n // ## 3b ##\n // Iterating over all the entities with this component and create the replica\n for (const [entity, compositeComponentValue] of component.data) {\n const componentValueDeserialized = getComponentValue(componentDefinition, compositeComponentValue);\n const targetEntity = getCompositeEntity(entity);\n const componentValue = componentDefinition.create(targetEntity, componentValueDeserialized);\n // ## 3c ##\n // All entities referenced in the composite probably has a different resolved EntityNumber\n // We'll know with the mappedEntityes\n if (componentDefinition.componentId === TransformComponentNumber) {\n const transform = componentValue;\n if (transform.parent) {\n transform.parent = getCompositeEntity(transform.parent);\n }\n else {\n transform.parent = getCompositeEntity(0);\n }\n // TODO: is it going to be necessary to remap assets? e.g. src param from AudioSource and GltfContainer\n }\n else {\n Schemas.mutateNestedValues(componentDefinition.schema.jsonSchema, componentValue, (value, valueType) => {\n if (valueType.serializationType === 'entity') {\n return { changed: true, value: getCompositeEntity(value) };\n }\n else {\n return { changed: false };\n }\n });\n }\n }\n }\n const composite = CompositeRootComponent.getMutableOrNull(compositeRootEntity) || CompositeRootComponent.create(compositeRootEntity);\n for (const [entitySource, targetEntity] of mappedEntities) {\n composite.entities.push({\n src: entitySource,\n dest: targetEntity\n });\n }\n composite.src = compositeResource.src;\n return compositeRootEntity;\n}\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Value } from \"./google/protobuf/struct.gen\";\nconst protobufPackageSarasa = \"\";\nfunction createBaseComponentData() {\n return { data: undefined };\n}\n/**\n * @public\n */\nexport var ComponentData;\n(function (ComponentData) {\n function encode(message, writer = _m0.Writer.create()) {\n switch (message.data?.$case) {\n case \"json\":\n Value.encode(Value.wrap(message.data.json), writer.uint32(10).fork()).ldelim();\n break;\n case \"binary\":\n writer.uint32(18).bytes(message.data.binary);\n break;\n }\n return writer;\n }\n ComponentData.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseComponentData();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.data = { $case: \"json\", json: Value.unwrap(Value.decode(reader, reader.uint32())) };\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.data = { $case: \"binary\", binary: reader.bytes() };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n ComponentData.decode = decode;\n function fromJSON(object) {\n return {\n data: isSet(object.json)\n ? { $case: \"json\", json: object.json }\n : isSet(object.binary)\n ? { $case: \"binary\", binary: bytesFromBase64(object.binary) }\n : undefined,\n };\n }\n ComponentData.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.data?.$case === \"json\" && (obj.json = message.data?.json);\n message.data?.$case === \"binary\" &&\n (obj.binary = message.data?.binary !== undefined ? base64FromBytes(message.data?.binary) : undefined);\n return obj;\n }\n ComponentData.toJSON = toJSON;\n})(ComponentData || (ComponentData = {}));\nfunction createBaseCompositeComponent() {\n return { name: \"\", jsonSchema: undefined, data: new Map() };\n}\n/**\n * @public\n */\nexport var CompositeComponent;\n(function (CompositeComponent) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.name !== \"\") {\n writer.uint32(10).string(message.name);\n }\n if (message.jsonSchema !== undefined) {\n Value.encode(Value.wrap(message.jsonSchema), writer.uint32(18).fork()).ldelim();\n }\n (message.data).forEach((value, key) => {\n CompositeComponent_DataEntry.encode({ key: key, value }, writer.uint32(26).fork()).ldelim();\n });\n return writer;\n }\n CompositeComponent.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCompositeComponent();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.name = reader.string();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.jsonSchema = Value.unwrap(Value.decode(reader, reader.uint32()));\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n const entry3 = CompositeComponent_DataEntry.decode(reader, reader.uint32());\n if (entry3.value !== undefined) {\n message.data.set(entry3.key, entry3.value);\n }\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n CompositeComponent.decode = decode;\n function fromJSON(object) {\n return {\n name: isSet(object.name) ? String(object.name) : \"\",\n jsonSchema: isSet(object?.jsonSchema) ? object.jsonSchema : undefined,\n data: isObject(object.data)\n ? Object.entries(object.data).reduce((acc, [key, value]) => {\n acc.set(Number(key), ComponentData.fromJSON(value));\n return acc;\n }, new Map())\n : new Map(),\n };\n }\n CompositeComponent.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.name !== undefined && (obj.name = message.name);\n message.jsonSchema !== undefined && (obj.jsonSchema = message.jsonSchema);\n obj.data = {};\n if (message.data) {\n message.data.forEach((v, k) => {\n obj.data[k] = ComponentData.toJSON(v);\n });\n }\n return obj;\n }\n CompositeComponent.toJSON = toJSON;\n})(CompositeComponent || (CompositeComponent = {}));\nfunction createBaseCompositeComponent_DataEntry() {\n return { key: 0, value: undefined };\n}\n/**\n * @public\n */\nexport var CompositeComponent_DataEntry;\n(function (CompositeComponent_DataEntry) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.key !== 0) {\n writer.uint32(8).int32(message.key);\n }\n if (message.value !== undefined) {\n ComponentData.encode(message.value, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n CompositeComponent_DataEntry.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCompositeComponent_DataEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.key = reader.int32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.value = ComponentData.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n CompositeComponent_DataEntry.decode = decode;\n function fromJSON(object) {\n return {\n key: isSet(object.key) ? Number(object.key) : 0,\n value: isSet(object.value) ? ComponentData.fromJSON(object.value) : undefined,\n };\n }\n CompositeComponent_DataEntry.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.key !== undefined && (obj.key = Math.round(message.key));\n message.value !== undefined && (obj.value = message.value ? ComponentData.toJSON(message.value) : undefined);\n return obj;\n }\n CompositeComponent_DataEntry.toJSON = toJSON;\n})(CompositeComponent_DataEntry || (CompositeComponent_DataEntry = {}));\nfunction createBaseCompositeDefinition() {\n return { version: 0, components: [] };\n}\n/**\n * @public\n */\nexport var CompositeDefinition;\n(function (CompositeDefinition) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.version !== 0) {\n writer.uint32(8).int32(message.version);\n }\n for (const v of message.components) {\n CompositeComponent.encode(v, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n CompositeDefinition.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCompositeDefinition();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.version = reader.int32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.components.push(CompositeComponent.decode(reader, reader.uint32()));\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n CompositeDefinition.decode = decode;\n function fromJSON(object) {\n return {\n version: isSet(object.version) ? Number(object.version) : 0,\n components: Array.isArray(object?.components)\n ? object.components.map((e) => CompositeComponent.fromJSON(e))\n : [],\n };\n }\n CompositeDefinition.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.version !== undefined && (obj.version = Math.round(message.version));\n if (message.components) {\n obj.components = message.components.map((e) => e ? CompositeComponent.toJSON(e) : undefined);\n }\n else {\n obj.components = [];\n }\n return obj;\n }\n CompositeDefinition.toJSON = toJSON;\n})(CompositeDefinition || (CompositeDefinition = {}));\nconst tsProtoGlobalThis = (() => {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw \"Unable to locate global object\";\n})();\nfunction bytesFromBase64(b64) {\n if (tsProtoGlobalThis.Buffer) {\n return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, \"base64\"));\n }\n else {\n const bin = tsProtoGlobalThis.atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n }\n}\nfunction base64FromBytes(arr) {\n if (tsProtoGlobalThis.Buffer) {\n return tsProtoGlobalThis.Buffer.from(arr).toString(\"base64\");\n }\n else {\n const bin = [];\n arr.forEach((byte) => {\n bin.push(String.fromCharCode(byte));\n });\n return tsProtoGlobalThis.btoa(bin.join(\"\"));\n }\n}\nfunction isObject(value) {\n return typeof value === \"object\" && value !== null;\n}\nfunction isSet(value) {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"google.protobuf\";\n/**\n * `NullValue` is a singleton enumeration to represent the null value for the\n * `Value` type union.\n *\n * The JSON representation for `NullValue` is JSON `null`.\n */\n/**\n * @public\n */\nexport var NullValue;\n(function (NullValue) {\n /** NULL_VALUE - Null value. */\n NullValue[NullValue[\"NULL_VALUE\"] = 0] = \"NULL_VALUE\";\n})(NullValue || (NullValue = {}));\n/**\n * @public\n */\nexport function nullValueFromJSON(object) {\n switch (object) {\n case 0:\n case \"NULL_VALUE\":\n return 0 /* NullValue.NULL_VALUE */;\n default:\n throw new tsProtoGlobalThis.Error(\"Unrecognized enum value \" + object + \" for enum NullValue\");\n }\n}\n/**\n * @public\n */\nexport function nullValueToJSON(object) {\n switch (object) {\n case 0 /* NullValue.NULL_VALUE */:\n return \"NULL_VALUE\";\n default:\n throw new tsProtoGlobalThis.Error(\"Unrecognized enum value \" + object + \" for enum NullValue\");\n }\n}\nfunction createBaseStruct() {\n return { fields: new Map() };\n}\n/**\n * @public\n */\nexport var Struct;\n(function (Struct) {\n function encode(message, writer = _m0.Writer.create()) {\n (message.fields).forEach((value, key) => {\n if (value !== undefined) {\n Struct_FieldsEntry.encode({ key: key, value }, writer.uint32(10).fork()).ldelim();\n }\n });\n return writer;\n }\n Struct.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseStruct();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32());\n if (entry1.value !== undefined) {\n message.fields.set(entry1.key, entry1.value);\n }\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Struct.decode = decode;\n function fromJSON(object) {\n return {\n fields: isObject(object.fields)\n ? Object.entries(object.fields).reduce((acc, [key, value]) => {\n acc.set(key, value);\n return acc;\n }, new Map())\n : new Map(),\n };\n }\n Struct.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n obj.fields = {};\n if (message.fields) {\n message.fields.forEach((v, k) => {\n obj.fields[k] = v;\n });\n }\n return obj;\n }\n Struct.toJSON = toJSON;\n function wrap(object) {\n const struct = createBaseStruct();\n if (object !== undefined) {\n Object.keys(object).forEach((key) => {\n struct.fields.set(key, object[key]);\n });\n }\n return struct;\n }\n Struct.wrap = wrap;\n function unwrap(message) {\n const object = {};\n [...message.fields.keys()].forEach((key) => {\n object[key] = message.fields.get(key);\n });\n return object;\n }\n Struct.unwrap = unwrap;\n})(Struct || (Struct = {}));\nfunction createBaseStruct_FieldsEntry() {\n return { key: \"\", value: undefined };\n}\n/**\n * @public\n */\nexport var Struct_FieldsEntry;\n(function (Struct_FieldsEntry) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.key !== \"\") {\n writer.uint32(10).string(message.key);\n }\n if (message.value !== undefined) {\n Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n Struct_FieldsEntry.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseStruct_FieldsEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.key = reader.string();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.value = Value.unwrap(Value.decode(reader, reader.uint32()));\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Struct_FieldsEntry.decode = decode;\n function fromJSON(object) {\n return { key: isSet(object.key) ? String(object.key) : \"\", value: isSet(object?.value) ? object.value : undefined };\n }\n Struct_FieldsEntry.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.key !== undefined && (obj.key = message.key);\n message.value !== undefined && (obj.value = message.value);\n return obj;\n }\n Struct_FieldsEntry.toJSON = toJSON;\n})(Struct_FieldsEntry || (Struct_FieldsEntry = {}));\nfunction createBaseValue() {\n return { kind: undefined };\n}\n/**\n * @public\n */\nexport var Value;\n(function (Value) {\n function encode(message, writer = _m0.Writer.create()) {\n switch (message.kind?.$case) {\n case \"nullValue\":\n writer.uint32(8).int32(message.kind.nullValue);\n break;\n case \"numberValue\":\n writer.uint32(17).double(message.kind.numberValue);\n break;\n case \"stringValue\":\n writer.uint32(26).string(message.kind.stringValue);\n break;\n case \"boolValue\":\n writer.uint32(32).bool(message.kind.boolValue);\n break;\n case \"structValue\":\n Struct.encode(Struct.wrap(message.kind.structValue), writer.uint32(42).fork()).ldelim();\n break;\n case \"listValue\":\n ListValue.encode(ListValue.wrap(message.kind.listValue), writer.uint32(50).fork()).ldelim();\n break;\n }\n return writer;\n }\n Value.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValue();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.kind = { $case: \"nullValue\", nullValue: reader.int32() };\n continue;\n case 2:\n if (tag !== 17) {\n break;\n }\n message.kind = { $case: \"numberValue\", numberValue: reader.double() };\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.kind = { $case: \"stringValue\", stringValue: reader.string() };\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.kind = { $case: \"boolValue\", boolValue: reader.bool() };\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.kind = { $case: \"structValue\", structValue: Struct.unwrap(Struct.decode(reader, reader.uint32())) };\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.kind = { $case: \"listValue\", listValue: ListValue.unwrap(ListValue.decode(reader, reader.uint32())) };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Value.decode = decode;\n function fromJSON(object) {\n return {\n kind: isSet(object.nullValue)\n ? { $case: \"nullValue\", nullValue: nullValueFromJSON(object.nullValue) }\n : isSet(object.numberValue)\n ? { $case: \"numberValue\", numberValue: Number(object.numberValue) }\n : isSet(object.stringValue)\n ? { $case: \"stringValue\", stringValue: String(object.stringValue) }\n : isSet(object.boolValue)\n ? { $case: \"boolValue\", boolValue: Boolean(object.boolValue) }\n : isSet(object.structValue)\n ? { $case: \"structValue\", structValue: object.structValue }\n : isSet(object.listValue)\n ? { $case: \"listValue\", listValue: [...object.listValue] }\n : undefined,\n };\n }\n Value.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.kind?.$case === \"nullValue\" &&\n (obj.nullValue = message.kind?.nullValue !== undefined ? nullValueToJSON(message.kind?.nullValue) : undefined);\n message.kind?.$case === \"numberValue\" && (obj.numberValue = message.kind?.numberValue);\n message.kind?.$case === \"stringValue\" && (obj.stringValue = message.kind?.stringValue);\n message.kind?.$case === \"boolValue\" && (obj.boolValue = message.kind?.boolValue);\n message.kind?.$case === \"structValue\" && (obj.structValue = message.kind?.structValue);\n message.kind?.$case === \"listValue\" && (obj.listValue = message.kind?.listValue);\n return obj;\n }\n Value.toJSON = toJSON;\n function wrap(value) {\n const result = createBaseValue();\n if (value === null) {\n result.kind = { $case: \"nullValue\", nullValue: 0 /* NullValue.NULL_VALUE */ };\n }\n else if (typeof value === \"boolean\") {\n result.kind = { $case: \"boolValue\", boolValue: value };\n }\n else if (typeof value === \"number\") {\n result.kind = { $case: \"numberValue\", numberValue: value };\n }\n else if (typeof value === \"string\") {\n result.kind = { $case: \"stringValue\", stringValue: value };\n }\n else if (Array.isArray(value)) {\n result.kind = { $case: \"listValue\", listValue: value };\n }\n else if (typeof value === \"object\") {\n result.kind = { $case: \"structValue\", structValue: value };\n }\n else if (typeof value !== \"undefined\") {\n throw new Error(\"Unsupported any value type: \" + typeof value);\n }\n return result;\n }\n Value.wrap = wrap;\n function unwrap(message) {\n if (message.kind?.$case === \"nullValue\") {\n return null;\n }\n else if (message.kind?.$case === \"numberValue\") {\n return message.kind?.numberValue;\n }\n else if (message.kind?.$case === \"stringValue\") {\n return message.kind?.stringValue;\n }\n else if (message.kind?.$case === \"boolValue\") {\n return message.kind?.boolValue;\n }\n else if (message.kind?.$case === \"structValue\") {\n return message.kind?.structValue;\n }\n else if (message.kind?.$case === \"listValue\") {\n return message.kind?.listValue;\n }\n else {\n return undefined;\n }\n }\n Value.unwrap = unwrap;\n})(Value || (Value = {}));\nfunction createBaseListValue() {\n return { values: [] };\n}\n/**\n * @public\n */\nexport var ListValue;\n(function (ListValue) {\n function encode(message, writer = _m0.Writer.create()) {\n for (const v of message.values) {\n Value.encode(Value.wrap(v), writer.uint32(10).fork()).ldelim();\n }\n return writer;\n }\n ListValue.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseListValue();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.values.push(Value.unwrap(Value.decode(reader, reader.uint32())));\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n ListValue.decode = decode;\n function fromJSON(object) {\n return { values: Array.isArray(object?.values) ? [...object.values] : [] };\n }\n ListValue.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n if (message.values) {\n obj.values = message.values.map((e) => e);\n }\n else {\n obj.values = [];\n }\n return obj;\n }\n ListValue.toJSON = toJSON;\n function wrap(array) {\n const result = createBaseListValue();\n result.values = array ?? [];\n return result;\n }\n ListValue.wrap = wrap;\n function unwrap(message) {\n if (message?.hasOwnProperty(\"values\") && Array.isArray(message.values)) {\n return message.values;\n }\n else {\n return message;\n }\n }\n ListValue.unwrap = unwrap;\n})(ListValue || (ListValue = {}));\nconst tsProtoGlobalThis = (() => {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw \"Unable to locate global object\";\n})();\nfunction isObject(value) {\n return typeof value === \"object\" && value !== null;\n}\nfunction isSet(value) {\n return value !== null && value !== undefined;\n}\n", "import { getCompositeRootComponent } from './components';\nimport { EntityMappingMode, instanceComposite } from './instance';\nimport { resolveComposite } from './path';\nimport { CompositeDefinition } from './proto/gen/composite.gen';\nexport { EntityMappingMode };\nexport { getCompositeRootComponent };\n/**\n * @public\n * @deprecated composite is not being supported so far, please do not use this feature\n */\nexport var Composite;\n(function (Composite) {\n /** @public */\n function fromJson(object) {\n return CompositeDefinition.fromJSON(object);\n }\n Composite.fromJson = fromJson;\n /** @public */\n function fromBinary(buffer) {\n return CompositeDefinition.decode(buffer);\n }\n Composite.fromBinary = fromBinary;\n /** @public */\n function toJson(composite) {\n return CompositeDefinition.toJSON(composite);\n }\n Composite.toJson = toJson;\n /** @public */\n function toBinary(composite) {\n return CompositeDefinition.encode(composite).finish();\n }\n Composite.toBinary = toBinary;\n /**\n * Instance a composite and returns its root entity\n * @param compositeData - state serialized by the CRDT protocol\n * @param getNextAvailableEntity - function that gives unused entities\n * @param rootEntity - (optional) suggested mapped rootEntity for the composite\n *\n * @public\n */\n /*#__PURE__*/ function instance(engine, compositeData, compositeProvider, options = {}) {\n instanceComposite(engine, compositeData, compositeProvider, options);\n }\n Composite.instance = instance;\n /**\n * Resolve and normalize a composite path\n * @param src - the source path\n * @param cwd - the directory from the resolve should start to resolve\n *\n * @returns the absolute resolved path without slash at the beginning\n * @public\n */\n /*#__PURE__*/ function resolveAndNormalizePath(src, cwd = '/') {\n return resolveComposite(src, cwd);\n }\n Composite.resolveAndNormalizePath = resolveAndNormalizePath;\n})(Composite || (Composite = {}));\n", "// The order of the following imports matters. Please do not auto-sort\nexport * from './engine';\nexport * from './schemas';\nexport * from './runtime/initialization';\nexport * from './runtime/types';\nexport * from './runtime/helpers';\nexport { cyclicParentingChecker } from './systems/cyclicParentingChecker';\nexport * from './systems/events';\nexport * from './systems/raycast';\nexport * from './systems/videoEvents';\nexport * from './systems/async-task';\nexport * from './engine/entity';\nexport * from './components/types';\n// @internal\nimport * as components from './components';\n// @internal\nexport { components };\nimport { engine } from './runtime/initialization';\n// export components for global engine\nexport const Transform = /* @__PURE__*/ components.Transform(engine);\nexport const Animator = /* @__PURE__*/ components.Animator(engine);\nexport const Material = /* @__PURE__*/ components.Material(engine);\nexport const MeshRenderer = /* @__PURE__*/ components.MeshRenderer(engine);\nexport const MeshCollider = /* @__PURE__*/ components.MeshCollider(engine);\nexport const Name = components.Name(engine);\nexport const Tween = /* @__PURE__*/ components.Tween(engine);\n/**\n * @alpha\n * This is going to be used for sync components through a server.\n * Can be modified in the future since it's still in research\n */\nexport const SyncComponents = /* @__PURE__*/ components.SyncComponents(engine);\n/**\n * @alpha\n * Tag a entity to be syncronized through comms\n */\nexport const NetworkEntity = /* @__PURE__*/ components.NetworkEntity(engine);\n/**\n * @alpha\n * Tag a entity to be syncronized through comms\n */\nexport const NetworkParent = /* @__PURE__*/ components.NetworkParent(engine);\n// export components for global engine\nexport * from './components/generated/global.gen';\nexport * from './components/generated/types.gen';\nexport * from './serialization/crdt';\nexport * from './composite';\n", "/**\n * Constant used to convert a value to gamma space\n * @public\n */\nexport const ToGammaSpace = 1 / 2.2;\n/**\n * Constant used to convert a value to linear space\n * @public\n */\nexport const ToLinearSpace = 2.2;\n/**\n * Constant used to define the minimal number value in Babylon.js\n * @public\n */\nexport const Epsilon = 0.000001;\n/**\n * Constant used to convert from Euler degrees to radians\n * @public\n */\nexport const DEG2RAD = Math.PI / 180;\n/**\n * Constant used to convert from radians to Euler degrees\n * @public\n */\nexport const RAD2DEG = 360 / (Math.PI * 2);\n", "/**\n * Scalar computation library\n * @public\n */\nexport var Scalar;\n(function (Scalar) {\n /**\n * Two pi constants convenient for computation.\n */\n Scalar.TwoPi = Math.PI * 2;\n /**\n * Boolean : true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)\n * @param a - number\n * @param b - number\n * @param epsilon - (default = 1.401298E-45)\n * @returns true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)\n */\n function withinEpsilon(a, b, epsilon = 1.401298e-45) {\n const num = a - b;\n return -epsilon <= num && num <= epsilon;\n }\n Scalar.withinEpsilon = withinEpsilon;\n /**\n * Returns a string : the upper case translation of the number i to hexadecimal.\n * @param i - number\n * @returns the upper case translation of the number i to hexadecimal.\n */\n function toHex(i) {\n const str = i.toString(16);\n if (i <= 15) {\n return ('0' + str).toUpperCase();\n }\n return str.toUpperCase();\n }\n Scalar.toHex = toHex;\n /**\n * Returns -1 if value is negative and +1 is value is positive.\n * @param _value - the value\n * @returns the value itself if it's equal to zero.\n */\n function sign(value) {\n const _value = +value; // convert to a number\n if (_value === 0 || isNaN(_value)) {\n return _value;\n }\n return _value > 0 ? 1 : -1;\n }\n Scalar.sign = sign;\n /**\n * Returns the value itself if it's between min and max.\n * Returns min if the value is lower than min.\n * Returns max if the value is greater than max.\n * @param value - the value to clmap\n * @param min - the min value to clamp to (default: 0)\n * @param max - the max value to clamp to (default: 1)\n * @returns the clamped value\n */\n function clamp(value, min = 0, max = 1) {\n return Math.min(max, Math.max(min, value));\n }\n Scalar.clamp = clamp;\n /**\n * the log2 of value.\n * @param value - the value to compute log2 of\n * @returns the log2 of value.\n */\n function log2(value) {\n return Math.log(value) * Math.LOG2E;\n }\n Scalar.log2 = log2;\n /**\n * Loops the value, so that it is never larger than length and never smaller than 0.\n *\n * This is similar to the modulo operator but it works with floating point numbers.\n * For example, using 3.0 for t and 2.5 for length, the result would be 0.5.\n * With t = 5 and length = 2.5, the result would be 0.0.\n * Note, however, that the behaviour is not defined for negative numbers as it is for the modulo operator\n * @param value - the value\n * @param length - the length\n * @returns the looped value\n */\n function repeat(value, length) {\n return value - Math.floor(value / length) * length;\n }\n Scalar.repeat = repeat;\n /**\n * Normalize the value between 0.0 and 1.0 using min and max values\n * @param value - value to normalize\n * @param min - max to normalize between\n * @param max - min to normalize between\n * @returns the normalized value\n */\n function normalize(value, min, max) {\n return (value - min) / (max - min);\n }\n Scalar.normalize = normalize;\n /**\n * Denormalize the value from 0.0 and 1.0 using min and max values\n * @param normalized - value to denormalize\n * @param min - max to denormalize between\n * @param max - min to denormalize between\n * @returns the denormalized value\n */\n function denormalize(normalized, min, max) {\n return normalized * (max - min) + min;\n }\n Scalar.denormalize = denormalize;\n /**\n * Calculates the shortest difference between two given angles given in degrees.\n * @param current - current angle in degrees\n * @param target - target angle in degrees\n * @returns the delta\n */\n function deltaAngle(current, target) {\n let num = repeat(target - current, 360.0);\n if (num > 180.0) {\n num -= 360.0;\n }\n return num;\n }\n Scalar.deltaAngle = deltaAngle;\n /**\n * PingPongs the value t, so that it is never larger than length and never smaller than 0.\n * @param tx - value\n * @param length - length\n * @returns The returned value will move back and forth between 0 and length\n */\n function pingPong(tx, length) {\n const t = repeat(tx, length * 2.0);\n return length - Math.abs(t - length);\n }\n Scalar.pingPong = pingPong;\n /**\n * Interpolates between min and max with smoothing at the limits.\n *\n * This export function interpolates between min and max in a similar way to Lerp. However, the interpolation will gradually speed up\n * from the start and slow down toward the end. This is useful for creating natural-looking animation, fading and other transitions.\n * @param from - from\n * @param to - to\n * @param tx - value\n * @returns the smooth stepped value\n */\n function smoothStep(from, to, tx) {\n let t = clamp(tx);\n t = -2.0 * t * t * t + 3.0 * t * t;\n return to * t + from * (1.0 - t);\n }\n Scalar.smoothStep = smoothStep;\n /**\n * Moves a value current towards target.\n *\n * This is essentially the same as Mathf.Lerp but instead the export function will ensure that the speed never exceeds maxDelta.\n * Negative values of maxDelta pushes the value away from target.\n * @param current - current value\n * @param target - target value\n * @param maxDelta - max distance to move\n * @returns resulting value\n */\n function moveTowards(current, target, maxDelta) {\n let result = 0;\n if (Math.abs(target - current) <= maxDelta) {\n result = target;\n }\n else {\n result = current + sign(target - current) * maxDelta;\n }\n return result;\n }\n Scalar.moveTowards = moveTowards;\n /**\n * Same as MoveTowards but makes sure the values interpolate correctly when they wrap around 360 degrees.\n *\n * Variables current and target are assumed to be in degrees. For optimization reasons, negative values of maxDelta\n * are not supported and may cause oscillation. To push current away from a target angle, add 180 to that angle instead.\n * @param current - current value\n * @param target - target value\n * @param maxDelta - max distance to move\n * @returns resulting angle\n */\n function moveTowardsAngle(current, target, maxDelta) {\n const num = deltaAngle(current, target);\n let result = 0;\n if (-maxDelta < num && num < maxDelta) {\n result = target;\n }\n else {\n result = moveTowards(current, current + num, maxDelta);\n }\n return result;\n }\n Scalar.moveTowardsAngle = moveTowardsAngle;\n /**\n * Creates a new scalar with values linearly interpolated of \"amount\" between the start scalar and the end scalar\n * @param start - start value\n * @param end - target value\n * @param amount - amount to lerp between\n * @returns the lerped value\n */\n function lerp(start, end, amount) {\n return start + (end - start) * amount;\n }\n Scalar.lerp = lerp;\n /**\n * Same as Lerp but makes sure the values interpolate correctly when they wrap around 360 degrees.\n * The parameter t is clamped to the range [0, 1]. Variables a and b are assumed to be in degrees.\n * @param start - start value\n * @param end - target value\n * @param amount - amount to lerp between\n * @returns the lerped value\n */\n function lerpAngle(start, end, amount) {\n let num = repeat(end - start, 360.0);\n if (num > 180.0) {\n num -= 360.0;\n }\n return start + num * clamp(amount);\n }\n Scalar.lerpAngle = lerpAngle;\n /**\n * Calculates the linear parameter t that produces the interpolant value within the range [a, b].\n * @param a - start value\n * @param b - target value\n * @param value - value between a and b\n * @returns the inverseLerp value\n */\n function inverseLerp(a, b, value) {\n let result = 0;\n if (a !== b) {\n result = clamp((value - a) / (b - a));\n }\n else {\n result = 0.0;\n }\n return result;\n }\n Scalar.inverseLerp = inverseLerp;\n /**\n * Returns a new scalar located for \"amount\" (float) on the Hermite spline defined by the scalars \"value1\", \"value3\", \"tangent1\", \"tangent2\".\n * {@link http://mathworld.wolfram.com/HermitePolynomial.html}\n * @param value1 - spline value\n * @param tangent1 - spline value\n * @param value2 - spline value\n * @param tangent2 - spline value\n * @param amount - input value\n * @returns hermite result\n */\n function hermite(value1, tangent1, value2, tangent2, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\n const part2 = -2.0 * cubed + 3.0 * squared;\n const part3 = cubed - 2.0 * squared + amount;\n const part4 = cubed - squared;\n return value1 * part1 + value2 * part2 + tangent1 * part3 + tangent2 * part4;\n }\n Scalar.hermite = hermite;\n /**\n * Returns a random float number between and min and max values\n * @param min - min value of random\n * @param max - max value of random\n * @returns random value\n */\n function randomRange(min, max) {\n if (min === max) {\n return min;\n }\n return Math.random() * (max - min) + min;\n }\n Scalar.randomRange = randomRange;\n /**\n * This export function returns percentage of a number in a given range.\n *\n * RangeToPercent(40,20,60) will return 0.5 (50%)\n * RangeToPercent(34,0,100) will return 0.34 (34%)\n * @param num - to convert to percentage\n * @param min - min range\n * @param max - max range\n * @returns the percentage\n */\n function rangeToPercent(num, min, max) {\n return (num - min) / (max - min);\n }\n Scalar.rangeToPercent = rangeToPercent;\n /**\n * This export function returns number that corresponds to the percentage in a given range.\n *\n * PercentToRange(0.34,0,100) will return 34.\n * @param percent - to convert to number\n * @param min - min range\n * @param max - max range\n * @returns the number\n */\n function percentToRange(percent, min, max) {\n return (max - min) * percent + min;\n }\n Scalar.percentToRange = percentToRange;\n /**\n * Returns the angle converted to equivalent value between -Math.PI and Math.PI radians.\n * @param angle - The angle to normalize in radian.\n * @returns The converted angle.\n */\n function normalizeRadians(angle) {\n // More precise but slower version kept for reference.\n // tslint:disable:no-commented-out-code\n /*\n // angle = angle % Tools.TwoPi;\n // angle = (angle + Tools.TwoPi) % Tools.TwoPi;\n \n //if (angle > Math.PI) {\n //\tangle -= Tools.TwoPi;\n //}\n */\n return angle - Scalar.TwoPi * Math.floor((angle + Math.PI) / Scalar.TwoPi);\n }\n Scalar.normalizeRadians = normalizeRadians;\n})(Scalar || (Scalar = {}));\n", "import { Epsilon } from './types';\nimport { Quaternion } from './Quaternion';\nimport { Scalar } from './Scalar';\n/**\n * @public\n * Vector3 is a type and a namespace.\n * ```\n * // The namespace contains all types and functions to operates with Vector3\n * const next = Vector3.add(pointA, velocityA)\n * // The type Vector3 is an alias to Vector3.ReadonlyVector3\n * const readonlyPosition: Vector3 = Vector3.Zero()\n * readonlyPosition.x = 0.1 // this FAILS\n *\n * // For mutable usage, use `Vector3.Mutable`\n * const position: Vector3.Mutable = Vector3.One()\n * position.x = 3.0 // this WORKS\n * ```\n */\nexport var Vector3;\n(function (Vector3) {\n /**\n * Gets a boolean indicating that the vector is non uniform meaning x, y or z are not all the same\n * @param vector - vector to check\n */\n function isNonUniform(vector) {\n const absX = Math.abs(vector.x);\n const absY = Math.abs(vector.y);\n if (absX !== absY) {\n return true;\n }\n const absZ = Math.abs(vector.z);\n if (absX !== absZ) {\n return true;\n }\n return false;\n }\n Vector3.isNonUniform = isNonUniform;\n /**\n * Creates a new Vector3 object from the given x, y, z (floats) coordinates.\n * @param x - defines the first coordinates (on X axis)\n * @param y - defines the second coordinates (on Y axis)\n * @param z - defines the third coordinates (on Z axis)\n */\n function create(\n /**\n * Defines the first coordinates (on X axis)\n */\n x = 0, \n /**\n * Defines the second coordinates (on Y axis)\n */\n y = 0, \n /**\n * Defines the third coordinates (on Z axis)\n */\n z = 0) {\n return { x, y, z };\n }\n Vector3.create = create;\n /**\n * Returns a new Vector3 as the result of the addition of the two given vectors.\n * @param vector1 - the first vector\n * @param vector2 - the second vector\n * @returns the resulting vector\n */\n function add(vector1, vector2) {\n return {\n x: vector1.x + vector2.x,\n y: vector1.y + vector2.y,\n z: vector1.z + vector2.z\n };\n }\n Vector3.add = add;\n /**\n * Add component by component the vector2 into dest\n * @param dest - the first vector and destination of addition\n * @param vector2 - the second vector\n */\n function addToRef(vector1, vector2, result) {\n result.x = vector1.x + vector2.x;\n result.y = vector1.y + vector2.y;\n result.z = vector1.z + vector2.z;\n }\n Vector3.addToRef = addToRef;\n /**\n * Returns a new Vector3 as the result of the substraction of the two given vectors.\n * @returns the resulting vector\n */\n function subtract(vector1, vector2) {\n return {\n x: vector1.x - vector2.x,\n y: vector1.y - vector2.y,\n z: vector1.z - vector2.z\n };\n }\n Vector3.subtract = subtract;\n /**\n * Returns a new Vector3 as the result of the substraction of the two given vectors.\n * @returns the resulting vector\n */\n function subtractToRef(vector1, vector2, result) {\n result.x = vector1.x - vector2.x;\n result.y = vector1.y - vector2.y;\n result.z = vector1.z - vector2.z;\n }\n Vector3.subtractToRef = subtractToRef;\n /**\n * Subtracts the given floats from the current Vector3 coordinates and set the given vector \"result\" with this result\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @param result - defines the Vector3 object where to store the result\n */\n function subtractFromFloatsToRef(vector1, x, y, z, result) {\n result.x = vector1.x - x;\n result.y = vector1.y - y;\n result.z = vector1.z - z;\n }\n Vector3.subtractFromFloatsToRef = subtractFromFloatsToRef;\n /**\n * Returns a new Vector3 with the other sign\n * @returns the resulting vector\n */\n function negate(value) {\n return { x: -value.x, y: -value.y, z: -value.z };\n }\n Vector3.negate = negate;\n /**\n * Copy source into dest\n *\n */\n function copyFrom(source, dest) {\n dest.x = source.x;\n dest.y = source.y;\n dest.z = source.z;\n }\n Vector3.copyFrom = copyFrom;\n /**\n * Sets the given vector \"dest\" with the given floats.\n * @param x - defines the x coordinate of the source\n * @param y - defines the y coordinate of the source\n * @param z - defines the z coordinate of the source\n * @param dest - defines the Vector3 where to store the result\n */\n function copyFromFloats(x, y, z, dest) {\n dest.x = x;\n dest.y = y;\n dest.z = z;\n }\n Vector3.copyFromFloats = copyFromFloats;\n /**\n * Returns a new Vector3 with the same value\n * @returns the resulting vector\n */\n function clone(source) {\n return create(source.x, source.y, source.z);\n }\n Vector3.clone = clone;\n /**\n * Get the clip factor between two vectors\n * @param vector0 - defines the first operand\n * @param vector1 - defines the second operand\n * @param axis - defines the axis to use\n * @param size - defines the size along the axis\n * @returns the clip factor\n */\n function getClipFactor(vector0, vector1, axis, size) {\n const d0 = dot(vector0, axis) - size;\n const d1 = dot(vector1, axis) - size;\n const s = d0 / (d0 - d1);\n return s;\n }\n Vector3.getClipFactor = getClipFactor;\n /**\n * Get angle between two vectors\n * @param vector0 - angle between vector0 and vector1\n * @param vector1 - angle between vector0 and vector1\n * @param normal - direction of the normal\n * @returns the angle between vector0 and vector1\n */\n function getAngleBetweenVectors(vector0, vector1, normal) {\n const v0 = normalize(vector0);\n const v1 = normalize(vector1);\n const v0v1dot = dot(v0, v1);\n const n = create();\n crossToRef(v0, v1, n);\n if (dot(n, normal) > 0) {\n return Math.acos(v0v1dot);\n }\n return -Math.acos(v0v1dot);\n }\n Vector3.getAngleBetweenVectors = getAngleBetweenVectors;\n /**\n * Returns a new Vector3 set from the index \"offset\" of the given array\n * @param array - defines the source array\n * @param offset - defines the offset in the source array\n * @returns the new Vector3\n */\n function fromArray(array, offset = 0) {\n return create(array[offset], array[offset + 1], array[offset + 2]);\n }\n Vector3.fromArray = fromArray;\n /**\n * Returns a new Vector3 set from the index \"offset\" of the given FloatArray\n * This function is deprecated. Use FromArray instead\n * @param array - defines the source array\n * @param offset - defines the offset in the source array\n * @returns the new Vector3\n */\n function fromFloatArray(array, offset) {\n return fromArray(array, offset);\n }\n Vector3.fromFloatArray = fromFloatArray;\n /**\n * Sets the given vector \"result\" with the element values from the index \"offset\" of the given array\n * @param array - defines the source array\n * @param offset - defines the offset in the source array\n * @param result - defines the Vector3 where to store the result\n */\n function fromArrayToRef(array, offset, result) {\n result.x = array[offset];\n result.y = array[offset + 1];\n result.z = array[offset + 2];\n }\n Vector3.fromArrayToRef = fromArrayToRef;\n /**\n * Sets the given vector \"result\" with the element values from the index \"offset\" of the given FloatArray\n * This function is deprecated. Use FromArrayToRef instead.\n * @param array - defines the source array\n * @param offset - defines the offset in the source array\n * @param result - defines the Vector3 where to store the result\n */\n function fromFloatArrayToRef(array, offset, result) {\n return fromArrayToRef(array, offset, result);\n }\n Vector3.fromFloatArrayToRef = fromFloatArrayToRef;\n // Properties\n /**\n * Gets the length of the Vector3\n * @returns the length of the Vector3\n */\n function length(vector) {\n return Math.sqrt(vector.x * vector.x + vector.y * vector.y + vector.z * vector.z);\n }\n Vector3.length = length;\n /**\n * Gets the squared length of the Vector3\n * @returns squared length of the Vector3\n */\n function lengthSquared(vector) {\n return vector.x * vector.x + vector.y * vector.y + vector.z * vector.z;\n }\n Vector3.lengthSquared = lengthSquared;\n /**\n * Returns a new Vector3 set with the current Vector3 coordinates multiplied by the float \"scale\"\n * @param scale - defines the multiplier factor\n * @returns a new Vector3\n */\n function scaleToRef(vector, scale, result) {\n result.x = vector.x * scale;\n result.y = vector.y * scale;\n result.z = vector.z * scale;\n }\n Vector3.scaleToRef = scaleToRef;\n /**\n * Returns a new Vector3 set with the current Vector3 coordinates multiplied by the float \"scale\"\n * @param scale - defines the multiplier factor\n * @returns a new Vector3\n */\n function scale(vector, scale) {\n return create(vector.x * scale, vector.y * scale, vector.z * scale);\n }\n Vector3.scale = scale;\n /**\n * Normalize the current Vector3 with the given input length.\n * Please note that this is an in place operation.\n * @param len - the length of the vector\n * @returns the current updated Vector3\n */\n function normalizeFromLength(vector, len) {\n const result = create(0, 0, 0);\n normalizeFromLengthToRef(vector, len, result);\n return result;\n }\n Vector3.normalizeFromLength = normalizeFromLength;\n /**\n * Normalize the current Vector3 with the given input length.\n * Please note that this is an in place operation.\n * @param len - the length of the vector\n * @returns the current updated Vector3\n */\n function normalizeFromLengthToRef(vector, len, result) {\n if (len === 0 || len === 1.0) {\n copyFrom(vector, result);\n return;\n }\n scaleToRef(vector, 1.0 / len, result);\n }\n Vector3.normalizeFromLengthToRef = normalizeFromLengthToRef;\n /**\n * Normalize the current Vector3.\n * Please note that this is an in place operation.\n * @returns the current updated Vector3\n */\n function normalize(vector) {\n return normalizeFromLength(vector, length(vector));\n }\n Vector3.normalize = normalize;\n /**\n * Normalize the current Vector3.\n * Please note that this is an in place operation.\n * @returns the current updated Vector3\n */\n function normalizeToRef(vector, result) {\n normalizeFromLengthToRef(vector, length(vector), result);\n }\n Vector3.normalizeToRef = normalizeToRef;\n /**\n * Returns the dot product (float) between the vectors \"left\" and \"right\"\n * @param left - defines the left operand\n * @param right - defines the right operand\n * @returns the dot product\n */\n function dot(left, right) {\n return left.x * right.x + left.y * right.y + left.z * right.z;\n }\n Vector3.dot = dot;\n /**\n * Multiplies this vector (with an implicit 1 in the 4th dimension) and m, and divides by perspective\n * @param matrix - The transformation matrix\n * @returns result Vector3\n */\n function applyMatrix4(vector, matrix) {\n const result = clone(vector);\n applyMatrix4ToRef(vector, matrix, result);\n return result;\n }\n Vector3.applyMatrix4 = applyMatrix4;\n /**\n * Multiplies this vector (with an implicit 1 in the 4th dimension) and m, and divides by perspective and set the given vector \"result\" with this result\n * @param matrix - The transformation matrix\n * @param result - defines the Vector3 object where to store the result\n */\n function applyMatrix4ToRef(vector, matrix, result) {\n const { x, y, z } = vector;\n const m = matrix._m;\n const w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\n result.x = (m[0] * x + m[4] * y + m[8] * z + m[12]) * w;\n result.y = (m[1] * x + m[5] * y + m[9] * z + m[13]) * w;\n result.z = (m[2] * x + m[6] * y + m[10] * z + m[14]) * w;\n }\n Vector3.applyMatrix4ToRef = applyMatrix4ToRef;\n /**\n * Rotates the current Vector3 based on the given quaternion\n * @param q - defines the Quaternion\n * @returns the current Vector3\n */\n function rotate(vector, q) {\n const result = create();\n rotateToRef(vector, q, result);\n return result;\n }\n Vector3.rotate = rotate;\n /**\n * Rotates current Vector3 based on the given quaternion, but applies the rotation to target Vector3.\n * @param q - defines the Quaternion\n * @param result - defines the target Vector3\n * @returns the current Vector3\n */\n function rotateToRef(vector, q, result) {\n const { x, y, z } = vector;\n const { x: qx, y: qy, z: qz, w: qw } = q;\n // calculate quat * vector\n const ix = qw * x + qy * z - qz * y;\n const iy = qw * y + qz * x - qx * z;\n const iz = qw * z + qx * y - qy * x;\n const iw = -qx * x - qy * y - qz * z;\n // calculate result * inverse quat\n result.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n result.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n result.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n }\n Vector3.rotateToRef = rotateToRef;\n /**\n * Returns a new Vector3 located for \"amount\" (float) on the linear interpolation between the vectors \"start\" and \"end\"\n * @param start - defines the start value\n * @param end - defines the end value\n * @param amount - max defines amount between both (between 0 and 1)\n * @returns the new Vector3\n */\n function lerp(start, end, amount) {\n const result = create(0, 0, 0);\n lerpToRef(start, end, amount, result);\n return result;\n }\n Vector3.lerp = lerp;\n /**\n * Sets the given vector \"result\" with the result of the linear interpolation from the vector \"start\" for \"amount\" to the vector \"end\"\n * @param start - defines the start value\n * @param end - defines the end value\n * @param amount - max defines amount between both (between 0 and 1)\n * @param result - defines the Vector3 where to store the result\n */\n function lerpToRef(start, end, amount, result) {\n result.x = start.x + (end.x - start.x) * amount;\n result.y = start.y + (end.y - start.y) * amount;\n result.z = start.z + (end.z - start.z) * amount;\n }\n Vector3.lerpToRef = lerpToRef;\n /**\n * Returns a new Vector3 as the cross product of the vectors \"left\" and \"right\"\n * The cross product is then orthogonal to both \"left\" and \"right\"\n * @param left - defines the left operand\n * @param right - defines the right operand\n * @returns the cross product\n */\n function cross(left, right) {\n const result = Zero();\n crossToRef(left, right, result);\n return result;\n }\n Vector3.cross = cross;\n /**\n * Sets the given vector \"result\" with the cross product of \"left\" and \"right\"\n * The cross product is then orthogonal to both \"left\" and \"right\"\n * @param left - defines the left operand\n * @param right - defines the right operand\n * @param result - defines the Vector3 where to store the result\n */\n function crossToRef(left, right, result) {\n result.x = left.y * right.z - left.z * right.y;\n result.y = left.z * right.x - left.x * right.z;\n result.z = left.x * right.y - left.y * right.x;\n }\n Vector3.crossToRef = crossToRef;\n /**\n * Returns a new Vector3 set with the result of the transformation by the given matrix of the given vector.\n * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\n * @param vector - defines the Vector3 to transform\n * @param transformation - defines the transformation matrix\n * @returns the transformed Vector3\n */\n function transformCoordinates(vector, transformation) {\n const result = Zero();\n transformCoordinatesToRef(vector, transformation, result);\n return result;\n }\n Vector3.transformCoordinates = transformCoordinates;\n /**\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given vector\n * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\n * @param vector - defines the Vector3 to transform\n * @param transformation - defines the transformation matrix\n * @param result - defines the Vector3 where to store the result\n */\n function transformCoordinatesToRef(vector, transformation, result) {\n return transformCoordinatesFromFloatsToRef(vector.x, vector.y, vector.z, transformation, result);\n }\n Vector3.transformCoordinatesToRef = transformCoordinatesToRef;\n /**\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z)\n * This method computes tranformed coordinates only, not transformed direction vectors\n * @param x - define the x coordinate of the source vector\n * @param y - define the y coordinate of the source vector\n * @param z - define the z coordinate of the source vector\n * @param transformation - defines the transformation matrix\n * @param result - defines the Vector3 where to store the result\n */\n function transformCoordinatesFromFloatsToRef(x, y, z, transformation, result) {\n const m = transformation._m;\n const rx = x * m[0] + y * m[4] + z * m[8] + m[12];\n const ry = x * m[1] + y * m[5] + z * m[9] + m[13];\n const rz = x * m[2] + y * m[6] + z * m[10] + m[14];\n const rw = 1 / (x * m[3] + y * m[7] + z * m[11] + m[15]);\n result.x = rx * rw;\n result.y = ry * rw;\n result.z = rz * rw;\n }\n Vector3.transformCoordinatesFromFloatsToRef = transformCoordinatesFromFloatsToRef;\n /**\n * Returns a new Vector3 set with the result of the normal transformation by the given matrix of the given vector\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\n * @param vector - defines the Vector3 to transform\n * @param transformation - defines the transformation matrix\n * @returns the new Vector3\n */\n function transformNormal(vector, transformation) {\n const result = Zero();\n transformNormalToRef(vector, transformation, result);\n return result;\n }\n Vector3.transformNormal = transformNormal;\n /**\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given vector\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\n * @param vector - defines the Vector3 to transform\n * @param transformation - defines the transformation matrix\n * @param result - defines the Vector3 where to store the result\n */\n function transformNormalToRef(vector, transformation, result) {\n transformNormalFromFloatsToRef(vector.x, vector.y, vector.z, transformation, result);\n }\n Vector3.transformNormalToRef = transformNormalToRef;\n /**\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given floats (x, y, z)\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\n * @param x - define the x coordinate of the source vector\n * @param y - define the y coordinate of the source vector\n * @param z - define the z coordinate of the source vector\n * @param transformation - defines the transformation matrix\n * @param result - defines the Vector3 where to store the result\n */\n function transformNormalFromFloatsToRef(x, y, z, transformation, result) {\n const m = transformation._m;\n result.x = x * m[0] + y * m[4] + z * m[8];\n result.y = x * m[1] + y * m[5] + z * m[9];\n result.z = x * m[2] + y * m[6] + z * m[10];\n }\n Vector3.transformNormalFromFloatsToRef = transformNormalFromFloatsToRef;\n /**\n * Returns a new Vector3 located for \"amount\" on the CatmullRom interpolation spline defined by the vectors \"value1\", \"value2\", \"value3\", \"value4\"\n * @param value1 - defines the first control point\n * @param value2 - defines the second control point\n * @param value3 - defines the third control point\n * @param value4 - defines the fourth control point\n * @param amount - defines the amount on the spline to use\n * @returns the new Vector3\n */\n function catmullRom(value1, value2, value3, value4, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const x = 0.5 *\n (2.0 * value2.x +\n (-value1.x + value3.x) * amount +\n (2.0 * value1.x - 5.0 * value2.x + 4.0 * value3.x - value4.x) *\n squared +\n (-value1.x + 3.0 * value2.x - 3.0 * value3.x + value4.x) * cubed);\n const y = 0.5 *\n (2.0 * value2.y +\n (-value1.y + value3.y) * amount +\n (2.0 * value1.y - 5.0 * value2.y + 4.0 * value3.y - value4.y) *\n squared +\n (-value1.y + 3.0 * value2.y - 3.0 * value3.y + value4.y) * cubed);\n const z = 0.5 *\n (2.0 * value2.z +\n (-value1.z + value3.z) * amount +\n (2.0 * value1.z - 5.0 * value2.z + 4.0 * value3.z - value4.z) *\n squared +\n (-value1.z + 3.0 * value2.z - 3.0 * value3.z + value4.z) * cubed);\n return create(x, y, z);\n }\n Vector3.catmullRom = catmullRom;\n /**\n * Returns a new Vector3 set with the coordinates of \"value\", if the vector \"value\" is in the cube defined by the vectors \"min\" and \"max\"\n * If a coordinate value of \"value\" is lower than one of the \"min\" coordinate, then this \"value\" coordinate is set with the \"min\" one\n * If a coordinate value of \"value\" is greater than one of the \"max\" coordinate, then this \"value\" coordinate is set with the \"max\" one\n * @param value - defines the current value\n * @param min - defines the lower range value\n * @param max - defines the upper range value\n * @returns the new Vector3\n */\n function clamp(value, min, max) {\n const v = create();\n clampToRef(value, min, max, v);\n return v;\n }\n Vector3.clamp = clamp;\n /**\n * Sets the given vector \"result\" with the coordinates of \"value\", if the vector \"value\" is in the cube defined by the vectors \"min\" and \"max\"\n * If a coordinate value of \"value\" is lower than one of the \"min\" coordinate, then this \"value\" coordinate is set with the \"min\" one\n * If a coordinate value of \"value\" is greater than one of the \"max\" coordinate, then this \"value\" coordinate is set with the \"max\" one\n * @param value - defines the current value\n * @param min - defines the lower range value\n * @param max - defines the upper range value\n * @param result - defines the Vector3 where to store the result\n */\n function clampToRef(value, min, max, result) {\n let x = value.x;\n x = x > max.x ? max.x : x;\n x = x < min.x ? min.x : x;\n let y = value.y;\n y = y > max.y ? max.y : y;\n y = y < min.y ? min.y : y;\n let z = value.z;\n z = z > max.z ? max.z : z;\n z = z < min.z ? min.z : z;\n copyFromFloats(x, y, z, result);\n }\n Vector3.clampToRef = clampToRef;\n /**\n * Returns a new Vector3 located for \"amount\" (float) on the Hermite interpolation spline defined by the vectors \"value1\", \"tangent1\", \"value2\", \"tangent2\"\n * @param value1 - defines the first control point\n * @param tangent1 - defines the first tangent vector\n * @param value2 - defines the second control point\n * @param tangent2 - defines the second tangent vector\n * @param amount - defines the amount on the interpolation spline (between 0 and 1)\n * @returns the new Vector3\n */\n function hermite(value1, tangent1, value2, tangent2, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\n const part2 = -2.0 * cubed + 3.0 * squared;\n const part3 = cubed - 2.0 * squared + amount;\n const part4 = cubed - squared;\n const x = value1.x * part1 +\n value2.x * part2 +\n tangent1.x * part3 +\n tangent2.x * part4;\n const y = value1.y * part1 +\n value2.y * part2 +\n tangent1.y * part3 +\n tangent2.y * part4;\n const z = value1.z * part1 +\n value2.z * part2 +\n tangent1.z * part3 +\n tangent2.z * part4;\n return create(x, y, z);\n }\n Vector3.hermite = hermite;\n /**\n * Gets the minimal coordinate values between two Vector3\n * @param left - defines the first operand\n * @param right - defines the second operand\n * @returns the new Vector3\n */\n function minimize(left, right) {\n const min = create();\n minimizeInPlaceFromFloatsToRef(right, left.x, left.y, left.z, min);\n return min;\n }\n Vector3.minimize = minimize;\n /**\n * Gets the maximal coordinate values between two Vector3\n * @param left - defines the first operand\n * @param right - defines the second operand\n * @returns the new Vector3\n */\n function maximize(left, right) {\n const max = create();\n maximizeInPlaceFromFloatsToRef(left, right.x, right.y, right.z, max);\n return max;\n }\n Vector3.maximize = maximize;\n /**\n * Returns the distance between the vectors \"value1\" and \"value2\"\n * @param value1 - defines the first operand\n * @param value2 - defines the second operand\n * @returns the distance\n */\n function distance(value1, value2) {\n return Math.sqrt(distanceSquared(value1, value2));\n }\n Vector3.distance = distance;\n /**\n * Returns the squared distance between the vectors \"value1\" and \"value2\"\n * @param value1 - defines the first operand\n * @param value2 - defines the second operand\n * @returns the squared distance\n */\n function distanceSquared(value1, value2) {\n const x = value1.x - value2.x;\n const y = value1.y - value2.y;\n const z = value1.z - value2.z;\n return x * x + y * y + z * z;\n }\n Vector3.distanceSquared = distanceSquared;\n /**\n * Returns a new Vector3 located at the center between \"value1\" and \"value2\"\n * @param value1 - defines the first operand\n * @param value2 - defines the second operand\n * @returns the new Vector3\n */\n function center(value1, value2) {\n const center = add(value1, value2);\n scaleToRef(center, 0.5, center);\n return center;\n }\n Vector3.center = center;\n /**\n * Given three orthogonal normalized left-handed oriented Vector3 axis in space (target system),\n * RotationFromAxis() returns the rotation Euler angles (ex : rotation.x, rotation.y, rotation.z) to apply\n * to something in order to rotate it from its local system to the given target system\n * Note: axis1, axis2 and axis3 are normalized during this operation\n * @param axis1 - defines the first axis\n * @param axis2 - defines the second axis\n * @param axis3 - defines the third axis\n * @returns a new Vector3\n */\n function rotationFromAxis(axis1, axis2, axis3) {\n const rotation = Zero();\n rotationFromAxisToRef(axis1, axis2, axis3, rotation);\n return rotation;\n }\n Vector3.rotationFromAxis = rotationFromAxis;\n /**\n * The same than RotationFromAxis but updates the given ref Vector3 parameter instead of returning a new Vector3\n * @param axis1 - defines the first axis\n * @param axis2 - defines the second axis\n * @param axis3 - defines the third axis\n * @param ref - defines the Vector3 where to store the result\n */\n function rotationFromAxisToRef(axis1, axis2, axis3, result) {\n const quat = Quaternion.create();\n Quaternion.fromAxisToRotationQuaternionToRef(axis1, axis2, axis3, quat);\n copyFrom(Quaternion.toEulerAngles(quat), result);\n }\n Vector3.rotationFromAxisToRef = rotationFromAxisToRef;\n /**\n * Creates a string representation of the Vector3\n * @returns a string with the Vector3 coordinates.\n */\n function toString(vector) {\n return `(${vector.x}, ${vector.y}, ${vector.z})`;\n }\n Vector3.toString = toString;\n /**\n * Creates the Vector3 hash code\n * @returns a number which tends to be unique between Vector3 instances\n */\n function getHashCode(vector) {\n let hash = vector.x || 0;\n hash = (hash * 397) ^ (vector.y || 0);\n hash = (hash * 397) ^ (vector.z || 0);\n return hash;\n }\n Vector3.getHashCode = getHashCode;\n /**\n * Returns true if the vector1 and the vector2 coordinates are strictly equal\n * @param vector1 - defines the first operand\n * @param vector2 - defines the second operand\n * @returns true if both vectors are equals\n */\n function equals(vector1, vector2) {\n return (vector1.x === vector2.x &&\n vector1.y === vector2.y &&\n vector1.z === vector2.z);\n }\n Vector3.equals = equals;\n /**\n * Returns true if the current Vector3 and the given vector coordinates are distant less than epsilon\n * @param otherVector - defines the second operand\n * @param epsilon - defines the minimal distance to define values as equals\n * @returns true if both vectors are distant less than epsilon\n */\n function equalsWithEpsilon(vector1, vector2, epsilon = Epsilon) {\n return (Scalar.withinEpsilon(vector1.x, vector2.x, epsilon) &&\n Scalar.withinEpsilon(vector1.y, vector2.y, epsilon) &&\n Scalar.withinEpsilon(vector1.z, vector2.z, epsilon));\n }\n Vector3.equalsWithEpsilon = equalsWithEpsilon;\n /**\n * Returns true if the current Vector3 coordinates equals the given floats\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @returns true if both vectors are equals\n */\n function equalsToFloats(vector, x, y, z) {\n return vector.x === x && vector.y === y && vector.z === z;\n }\n Vector3.equalsToFloats = equalsToFloats;\n /**\n * Returns a new Vector3, result of the multiplication of vector1 by the vector2\n * @param vector1 - defines the first operand\n * @param vector2 - defines the second operand\n * @returns the new Vector3\n */\n function multiply(vector1, vector2) {\n const result = create();\n multiplyToRef(vector1, vector2, result);\n return result;\n }\n Vector3.multiply = multiply;\n /**\n * Multiplies the current Vector3 by the given one and stores the result in the given vector \"result\"\n * @param otherVector - defines the second operand\n * @param result - defines the Vector3 object where to store the result\n * @returns the current Vector3\n */\n function multiplyToRef(vector1, vector2, result) {\n result.x = vector1.x * vector2.x;\n result.y = vector1.y * vector2.y;\n result.z = vector1.z * vector2.z;\n }\n Vector3.multiplyToRef = multiplyToRef;\n /**\n * Returns a new Vector3 set with the result of the mulliplication of the current Vector3 coordinates by the given floats\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @returns the new Vector3\n */\n function multiplyByFloatsToRef(vector1, x, y, z, result) {\n result.x = vector1.x * x;\n result.y = vector1.y * y;\n result.z = vector1.z * z;\n }\n Vector3.multiplyByFloatsToRef = multiplyByFloatsToRef;\n /**\n * Returns a new Vector3 set with the result of the mulliplication of the current Vector3 coordinates by the given floats\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @returns the new Vector3\n */\n function multiplyByFloats(vector1, x, y, z) {\n const result = create();\n multiplyByFloatsToRef(vector1, x, y, z, result);\n return result;\n }\n Vector3.multiplyByFloats = multiplyByFloats;\n /**\n * Returns a new Vector3 set with the result of the division of the current Vector3 coordinates by the given ones\n * @param otherVector - defines the second operand\n * @returns the new Vector3\n */\n function divide(vector1, vector2) {\n return {\n x: vector1.x / vector2.x,\n y: vector1.y / vector2.y,\n z: vector1.z / vector2.z\n };\n }\n Vector3.divide = divide;\n /**\n * Divides the current Vector3 coordinates by the given ones and stores the result in the given vector \"result\"\n * @param otherVector - defines the second operand\n * @param result - defines the Vector3 object where to store the result\n * @returns the current Vector3\n */\n function divideToRef(vector1, vector2, result) {\n result.x = vector1.x / vector2.x;\n result.y = vector1.y / vector2.y;\n result.z = vector1.z / vector2.z;\n }\n Vector3.divideToRef = divideToRef;\n /**\n * Set result Vector3 with the maximal coordinate values between vector1 and the given coordinates\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @param result - the set Vector3\n */\n function maximizeInPlaceFromFloatsToRef(vector1, x, y, z, result) {\n if (x > vector1.x) {\n result.x = x;\n }\n else {\n result.x = vector1.x;\n }\n if (y > vector1.y) {\n result.y = y;\n }\n else {\n result.y = vector1.y;\n }\n if (z > vector1.z) {\n result.z = z;\n }\n else {\n result.z = vector1.z;\n }\n }\n Vector3.maximizeInPlaceFromFloatsToRef = maximizeInPlaceFromFloatsToRef;\n /**\n * Set result Vector3 with the minimal coordinate values between vector1 and the given coordinates\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @param result - the set Vector3\n */\n function minimizeInPlaceFromFloatsToRef(vector1, x, y, z, result) {\n if (x < vector1.x) {\n result.x = x;\n }\n else {\n result.x = vector1.x;\n }\n if (y < vector1.y) {\n result.y = y;\n }\n else {\n result.y = vector1.y;\n }\n if (z < vector1.z) {\n result.z = z;\n }\n else {\n result.z = vector1.z;\n }\n }\n Vector3.minimizeInPlaceFromFloatsToRef = minimizeInPlaceFromFloatsToRef;\n /**\n * Gets a new Vector3 from vector1 floored values\n * @returns a new Vector3\n */\n function floor(vector1) {\n return create(Math.floor(vector1.x), Math.floor(vector1.y), Math.floor(vector1.z));\n }\n Vector3.floor = floor;\n /**\n * Gets a new Vector3 from vector1 floored values\n * @returns a new Vector3\n */\n function fract(vector1) {\n return create(vector1.x - Math.floor(vector1.x), vector1.y - Math.floor(vector1.y), vector1.z - Math.floor(vector1.z));\n }\n Vector3.fract = fract;\n /**\n * Returns a new Vector3 set to (0.0, 0.0, 0.0)\n * @returns a new empty Vector3\n */\n function Zero() {\n return create(0.0, 0.0, 0.0);\n }\n Vector3.Zero = Zero;\n /**\n * Returns a new Vector3 set to (1.0, 1.0, 1.0)\n * @returns a new unit Vector3\n */\n function One() {\n return create(1.0, 1.0, 1.0);\n }\n Vector3.One = One;\n /**\n * Returns a new Vector3 set tolengthSquared (0.0, 1.0, 0.0)\n * @returns a new up Vector3\n */\n function Up() {\n return create(0.0, 1.0, 0.0);\n }\n Vector3.Up = Up;\n /**\n * Returns a new Vector3 set to (0.0, -1.0, 0.0)\n * @returns a new down Vector3\n */\n function Down() {\n return create(0.0, -1.0, 0.0);\n }\n Vector3.Down = Down;\n /**\n * Returns a new Vector3 set to (0.0, 0.0, 1.0)\n * @returns a new forward Vector3\n */\n function Forward() {\n return create(0.0, 0.0, 1.0);\n }\n Vector3.Forward = Forward;\n /**\n * Returns a new Vector3 set to (0.0, 0.0, -1.0)\n * @returns a new forward Vector3\n */\n function Backward() {\n return create(0.0, 0.0, -1.0);\n }\n Vector3.Backward = Backward;\n /**\n * Returns a new Vector3 set to (1.0, 0.0, 0.0)\n * @returns a new right Vector3\n */\n function Right() {\n return create(1.0, 0.0, 0.0);\n }\n Vector3.Right = Right;\n /**\n * Returns a new Vector3 set to (-1.0, 0.0, 0.0)\n * @returns a new left Vector3\n */\n function Left() {\n return create(-1.0, 0.0, 0.0);\n }\n Vector3.Left = Left;\n /**\n * Returns a new random Vector3\n * @returns a random Vector3\n */\n function Random() {\n return create(Math.random(), Math.random(), Math.random());\n }\n Vector3.Random = Random;\n})(Vector3 || (Vector3 = {}));\n", "import { Vector3 } from './Vector3';\nimport { Matrix } from './Matrix';\n/**\n * Represens a plane by the equation ax + by + cz + d = 0\n * @public\n */\nexport var Plane;\n(function (Plane) {\n /**\n * Creates a Plane object according to the given floats a, b, c, d and the plane equation : ax + by + cz + d = 0\n * @param a - a component of the plane\n * @param b - b component of the plane\n * @param c - c component of the plane\n * @param d - d component of the plane\n */\n function create(a, b, c, d) {\n return {\n normal: Vector3.create(a, b, c),\n d: d\n };\n }\n Plane.create = create;\n // Statics\n /**\n * Creates a plane from an array\n * @param array - the array to create a plane from\n * @returns a new Plane from the given array.\n */\n function fromArray(array) {\n return create(array[0], array[1], array[2], array[3]);\n }\n Plane.fromArray = fromArray;\n /**\n * Creates a plane from three points\n * @param point1 - point used to create the plane\n * @param point2 - point used to create the plane\n * @param point3 - point used to create the plane\n * @returns a new Plane defined by the three given points.\n */\n function fromPoints(_point1, _point2, _point3) {\n const result = create(0.0, 0.0, 0.0, 0.0);\n // TODO\n // result.copyFromPoints(point1, point2, point3)\n return result;\n }\n Plane.fromPoints = fromPoints;\n /**\n * Creates a plane from an origin point and a normal\n * @param origin - origin of the plane to be constructed\n * @param normal - normal of the plane to be constructed\n * @returns a new Plane the normal vector to this plane at the given origin point.\n * Note : the vector \"normal\" is updated because normalized.\n */\n function romPositionAndNormal(origin, normal) {\n const result = create(0.0, 0.0, 0.0, 0.0);\n result.normal = Vector3.normalize(normal);\n result.d = -(normal.x * origin.x +\n normal.y * origin.y +\n normal.z * origin.z);\n return result;\n }\n Plane.romPositionAndNormal = romPositionAndNormal;\n /**\n * Calculates the distance from a plane and a point\n * @param origin - origin of the plane to be constructed\n * @param normal - normal of the plane to be constructed\n * @param point - point to calculate distance to\n * @returns the signed distance between the plane defined by the normal vector at the \"origin\"\" point and the given other point.\n */\n function signedDistanceToPlaneFromPositionAndNormal(origin, normal, point) {\n const d = -(normal.x * origin.x + normal.y * origin.y + normal.z * origin.z);\n return Vector3.dot(point, normal) + d;\n }\n Plane.signedDistanceToPlaneFromPositionAndNormal = signedDistanceToPlaneFromPositionAndNormal;\n /**\n * @returns the plane coordinates as a new array of 4 elements [a, b, c, d].\n */\n function asArray(plane) {\n return [plane.normal.x, plane.normal.y, plane.normal.z, plane.d];\n }\n Plane.asArray = asArray;\n // Methods\n /**\n * @returns a new plane copied from the current Plane.\n */\n function clone(plane) {\n return create(plane.normal.x, plane.normal.y, plane.normal.z, plane.d);\n }\n Plane.clone = clone;\n /**\n * @returns the Plane hash code.\n */\n function getHashCode(_plane) {\n // TODO\n // let hash = plane.normal.getHashCode()\n // hash = (hash * 397) ^ (plane.d || 0)\n // return hash\n return 0;\n }\n Plane.getHashCode = getHashCode;\n /**\n * Normalize the current Plane in place.\n * @returns the updated Plane.\n */\n function normalize(plane) {\n const result = create(0, 0, 0, 0);\n const norm = Math.sqrt(plane.normal.x * plane.normal.x +\n plane.normal.y * plane.normal.y +\n plane.normal.z * plane.normal.z);\n let magnitude = 0.0;\n if (norm !== 0) {\n magnitude = 1.0 / norm;\n }\n result.normal.x = plane.normal.x * magnitude;\n result.normal.y = plane.normal.y * magnitude;\n result.normal.z = plane.normal.z * magnitude;\n result.d *= magnitude;\n return plane;\n }\n Plane.normalize = normalize;\n /**\n * Applies a transformation the plane and returns the result\n * @param transformation - the transformation matrix to be applied to the plane\n * @returns a new Plane as the result of the transformation of the current Plane by the given matrix.\n */\n function transform(plane, transformation) {\n const transposedMatrix = Matrix.create();\n Matrix.transposeToRef(transformation, transposedMatrix);\n const m = transposedMatrix._m;\n const x = plane.normal.x;\n const y = plane.normal.y;\n const z = plane.normal.z;\n const d = plane.d;\n const normalX = x * m[0] + y * m[1] + z * m[2] + d * m[3];\n const normalY = x * m[4] + y * m[5] + z * m[6] + d * m[7];\n const normalZ = x * m[8] + y * m[9] + z * m[10] + d * m[11];\n const finalD = x * m[12] + y * m[13] + z * m[14] + d * m[15];\n return create(normalX, normalY, normalZ, finalD);\n }\n Plane.transform = transform;\n /**\n * Calcualtte the dot product between the point and the plane normal\n * @param point - point to calculate the dot product with\n * @returns the dot product (float) of the point coordinates and the plane normal.\n */\n function dotCoordinate(plane, point) {\n return (plane.normal.x * point.x +\n plane.normal.y * point.y +\n plane.normal.z * point.z +\n plane.d);\n }\n Plane.dotCoordinate = dotCoordinate;\n /**\n * Updates the current Plane from the plane defined by the three given points.\n * @param point1 - one of the points used to contruct the plane\n * @param point2 - one of the points used to contruct the plane\n * @param point3 - one of the points used to contruct the plane\n * @returns the updated Plane.\n */\n function copyFromPoints(point1, point2, point3) {\n const x1 = point2.x - point1.x;\n const y1 = point2.y - point1.y;\n const z1 = point2.z - point1.z;\n const x2 = point3.x - point1.x;\n const y2 = point3.y - point1.y;\n const z2 = point3.z - point1.z;\n const yz = y1 * z2 - z1 * y2;\n const xz = z1 * x2 - x1 * z2;\n const xy = x1 * y2 - y1 * x2;\n const pyth = Math.sqrt(yz * yz + xz * xz + xy * xy);\n let invPyth;\n if (pyth !== 0) {\n invPyth = 1.0 / pyth;\n }\n else {\n invPyth = 0.0;\n }\n const normal = Vector3.create(yz * invPyth, xz * invPyth, xy * invPyth);\n return {\n normal,\n d: -(normal.x * point1.x + normal.y * point1.y + normal.z * point1.z)\n };\n }\n Plane.copyFromPoints = copyFromPoints;\n /**\n * Checks if the plane is facing a given direction\n * @param direction - the direction to check if the plane is facing\n * @param epsilon - value the dot product is compared against (returns true if dot <= epsilon)\n * @returns True is the vector \"direction\" is the same side than the plane normal.\n */\n function isFrontFacingTo(plane, direction, epsilon) {\n const dot = Vector3.dot(plane.normal, direction);\n return dot <= epsilon;\n }\n Plane.isFrontFacingTo = isFrontFacingTo;\n /**\n * Calculates the distance to a point\n * @param point - point to calculate distance to\n * @returns the signed distance (float) from the given point to the Plane.\n */\n function signedDistanceTo(plane, point) {\n return Vector3.dot(point, plane.normal) + plane.d;\n }\n Plane.signedDistanceTo = signedDistanceTo;\n})(Plane || (Plane = {}));\n", "import { Vector3 } from './Vector3';\nimport { Quaternion } from './Quaternion';\nimport { Plane } from './Plane';\n/**\n * Class used to store matrix data (4x4)\n * @public\n */\nexport var Matrix;\n(function (Matrix) {\n /**\n * Gets the internal data of the matrix\n */\n function m(self) {\n return self._m;\n }\n Matrix.m = m;\n let _updateFlagSeed = 0;\n const _identityReadonly = {};\n /**\n * Gets an identity matrix that must not be updated\n */\n function IdentityReadonly() {\n return _identityReadonly;\n }\n Matrix.IdentityReadonly = IdentityReadonly;\n /**\n * Creates an empty matrix (filled with zeros)\n */\n function create() {\n const newMatrix = {\n updateFlag: 0,\n isIdentity: false,\n isIdentity3x2: true,\n _isIdentityDirty: true,\n _isIdentity3x2Dirty: true,\n _m: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n };\n _updateIdentityStatus(newMatrix, false);\n return newMatrix;\n }\n Matrix.create = create;\n // Statics\n /**\n * Creates a matrix from an array\n * @param array - defines the source array\n * @param offset - defines an offset in the source array\n * @returns a new Matrix set from the starting index of the given array\n */\n function fromArray(array, offset = 0) {\n const result = create();\n fromArrayToRef(array, offset, result);\n return result;\n }\n Matrix.fromArray = fromArray;\n /**\n * Copy the content of an array into a given matrix\n * @param array - defines the source array\n * @param offset - defines an offset in the source array\n * @param result - defines the target matrix\n */\n function fromArrayToRef(array, offset, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] = array[index + offset];\n }\n _markAsUpdated(result);\n }\n Matrix.fromArrayToRef = fromArrayToRef;\n /**\n * Stores an array into a matrix after having multiplied each component by a given factor\n * @param array - defines the source array\n * @param offset - defines the offset in the source array\n * @param scale - defines the scaling factor\n * @param result - defines the target matrix\n */\n function fromFloatArrayToRefScaled(array, offset, scale, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] = array[index + offset] * scale;\n }\n _markAsUpdated(result);\n }\n Matrix.fromFloatArrayToRefScaled = fromFloatArrayToRefScaled;\n /**\n * Stores a list of values (16) inside a given matrix\n * @param initialM11 - defines 1st value of 1st row\n * @param initialM12 - defines 2nd value of 1st row\n * @param initialM13 - defines 3rd value of 1st row\n * @param initialM14 - defines 4th value of 1st row\n * @param initialM21 - defines 1st value of 2nd row\n * @param initialM22 - defines 2nd value of 2nd row\n * @param initialM23 - defines 3rd value of 2nd row\n * @param initialM24 - defines 4th value of 2nd row\n * @param initialM31 - defines 1st value of 3rd row\n * @param initialM32 - defines 2nd value of 3rd row\n * @param initialM33 - defines 3rd value of 3rd row\n * @param initialM34 - defines 4th value of 3rd row\n * @param initialM41 - defines 1st value of 4th row\n * @param initialM42 - defines 2nd value of 4th row\n * @param initialM43 - defines 3rd value of 4th row\n * @param initialM44 - defines 4th value of 4th row\n * @param result - defines the target matrix\n */\n function fromValuesToRef(initialM11, initialM12, initialM13, initialM14, initialM21, initialM22, initialM23, initialM24, initialM31, initialM32, initialM33, initialM34, initialM41, initialM42, initialM43, initialM44, result) {\n const m = result._m;\n m[0] = initialM11;\n m[1] = initialM12;\n m[2] = initialM13;\n m[3] = initialM14;\n m[4] = initialM21;\n m[5] = initialM22;\n m[6] = initialM23;\n m[7] = initialM24;\n m[8] = initialM31;\n m[9] = initialM32;\n m[10] = initialM33;\n m[11] = initialM34;\n m[12] = initialM41;\n m[13] = initialM42;\n m[14] = initialM43;\n m[15] = initialM44;\n _markAsUpdated(result);\n }\n Matrix.fromValuesToRef = fromValuesToRef;\n /**\n * Creates new matrix from a list of values (16)\n * @param initialM11 - defines 1st value of 1st row\n * @param initialM12 - defines 2nd value of 1st row\n * @param initialM13 - defines 3rd value of 1st row\n * @param initialM14 - defines 4th value of 1st row\n * @param initialM21 - defines 1st value of 2nd row\n * @param initialM22 - defines 2nd value of 2nd row\n * @param initialM23 - defines 3rd value of 2nd row\n * @param initialM24 - defines 4th value of 2nd row\n * @param initialM31 - defines 1st value of 3rd row\n * @param initialM32 - defines 2nd value of 3rd row\n * @param initialM33 - defines 3rd value of 3rd row\n * @param initialM34 - defines 4th value of 3rd row\n * @param initialM41 - defines 1st value of 4th row\n * @param initialM42 - defines 2nd value of 4th row\n * @param initialM43 - defines 3rd value of 4th row\n * @param initialM44 - defines 4th value of 4th row\n * @returns the new matrix\n */\n function fromValues(initialM11, initialM12, initialM13, initialM14, initialM21, initialM22, initialM23, initialM24, initialM31, initialM32, initialM33, initialM34, initialM41, initialM42, initialM43, initialM44) {\n const result = create();\n const m = result._m;\n m[0] = initialM11;\n m[1] = initialM12;\n m[2] = initialM13;\n m[3] = initialM14;\n m[4] = initialM21;\n m[5] = initialM22;\n m[6] = initialM23;\n m[7] = initialM24;\n m[8] = initialM31;\n m[9] = initialM32;\n m[10] = initialM33;\n m[11] = initialM34;\n m[12] = initialM41;\n m[13] = initialM42;\n m[14] = initialM43;\n m[15] = initialM44;\n _markAsUpdated(result);\n return result;\n }\n Matrix.fromValues = fromValues;\n /**\n * Creates a new matrix composed by merging scale (vector3), rotation (quaternion) and translation (vector3)\n * @param scale - defines the scale vector3\n * @param rotation - defines the rotation quaternion\n * @param translation - defines the translation vector3\n * @returns a new matrix\n */\n function compose(scale, rotation, translation) {\n const result = create();\n composeToRef(scale, rotation, translation, result);\n return result;\n }\n Matrix.compose = compose;\n /**\n * Sets a matrix to a value composed by merging scale (vector3), rotation (quaternion) and translation (vector3)\n * @param scale - defines the scale vector3\n * @param rotation - defines the rotation quaternion\n * @param translation - defines the translation vector3\n * @param result - defines the target matrix\n */\n function composeToRef(scale, rotation, translation, result) {\n const tmpMatrix = [create(), create(), create()];\n scalingToRef(scale.x, scale.y, scale.z, tmpMatrix[1]);\n fromQuaternionToRef(rotation, tmpMatrix[0]);\n multiplyToRef(tmpMatrix[1], tmpMatrix[0], result);\n setTranslation(result, translation);\n }\n Matrix.composeToRef = composeToRef;\n /**\n * Creates a new identity matrix\n * @returns a new identity matrix\n */\n function Identity() {\n const identity = fromValues(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);\n _updateIdentityStatus(identity, true);\n return identity;\n }\n Matrix.Identity = Identity;\n /**\n * Creates a new identity matrix and stores the result in a given matrix\n * @param result - defines the target matrix\n */\n function IdentityToRef(result) {\n fromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n _updateIdentityStatus(result, true);\n }\n Matrix.IdentityToRef = IdentityToRef;\n /**\n * Creates a new zero matrix\n * @returns a new zero matrix\n */\n function Zero() {\n const zero = fromValues(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);\n _updateIdentityStatus(zero, false);\n return zero;\n }\n Matrix.Zero = Zero;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the X axis\n * @param angle - defines the angle (in radians) to use\n * @returns the new matrix\n */\n function RotationX(angle) {\n const result = create();\n rotationXToRef(angle, result);\n return result;\n }\n Matrix.RotationX = RotationX;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the X axis and stores it in a given matrix\n * @param angle - defines the angle (in radians) to use\n * @param result - defines the target matrix\n */\n function rotationXToRef(angle, result) {\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n fromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, c, s, 0.0, 0.0, -s, c, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n _updateIdentityStatus(result, c === 1 && s === 0);\n }\n Matrix.rotationXToRef = rotationXToRef;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Y axis\n * @param angle - defines the angle (in radians) to use\n * @returns the new matrix\n */\n function rotationY(angle) {\n const result = create();\n rotationYToRef(angle, result);\n return result;\n }\n Matrix.rotationY = rotationY;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Y axis and stores it in a given matrix\n * @param angle - defines the angle (in radians) to use\n * @param result - defines the target matrix\n */\n function rotationYToRef(angle, result) {\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n fromValuesToRef(c, 0.0, -s, 0.0, 0.0, 1.0, 0.0, 0.0, s, 0.0, c, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n _updateIdentityStatus(result, c === 1 && s === 0);\n }\n Matrix.rotationYToRef = rotationYToRef;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Z axis\n * @param angle - defines the angle (in radians) to use\n * @returns the new matrix\n */\n function rotationZ(angle) {\n const result = create();\n rotationZToRef(angle, result);\n return result;\n }\n Matrix.rotationZ = rotationZ;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Z axis and stores it in a given matrix\n * @param angle - defines the angle (in radians) to use\n * @param result - defines the target matrix\n */\n function rotationZToRef(angle, result) {\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n fromValuesToRef(c, s, 0.0, 0.0, -s, c, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n _updateIdentityStatus(result, c === 1 && s === 0);\n }\n Matrix.rotationZToRef = rotationZToRef;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the given axis\n * @param axis - defines the axis to use\n * @param angle - defines the angle (in radians) to use\n * @returns the new matrix\n */\n function rotationAxis(axis, angle) {\n const result = create();\n rotationAxisToRef(axis, angle, result);\n return result;\n }\n Matrix.rotationAxis = rotationAxis;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the given axis and stores it in a given matrix\n * @param axis - defines the axis to use\n * @param angle - defines the angle (in radians) to use\n * @param result - defines the target matrix\n */\n function rotationAxisToRef(_axis, angle, result) {\n const s = Math.sin(-angle);\n const c = Math.cos(-angle);\n const c1 = 1 - c;\n const axis = Vector3.normalize(_axis);\n const m = result._m;\n m[0] = axis.x * axis.x * c1 + c;\n m[1] = axis.x * axis.y * c1 - axis.z * s;\n m[2] = axis.x * axis.z * c1 + axis.y * s;\n m[3] = 0.0;\n m[4] = axis.y * axis.x * c1 + axis.z * s;\n m[5] = axis.y * axis.y * c1 + c;\n m[6] = axis.y * axis.z * c1 - axis.x * s;\n m[7] = 0.0;\n m[8] = axis.z * axis.x * c1 - axis.y * s;\n m[9] = axis.z * axis.y * c1 + axis.x * s;\n m[10] = axis.z * axis.z * c1 + c;\n m[11] = 0.0;\n m[12] = 0.0;\n m[13] = 0.0;\n m[14] = 0.0;\n m[15] = 1.0;\n _markAsUpdated(result);\n }\n Matrix.rotationAxisToRef = rotationAxisToRef;\n /**\n * Creates a rotation matrix\n * @param yaw - defines the yaw angle in radians (Y axis)\n * @param pitch - defines the pitch angle in radians (X axis)\n * @param roll - defines the roll angle in radians (X axis)\n * @returns the new rotation matrix\n */\n function rotationYawPitchRoll(yaw, pitch, roll) {\n const result = create();\n rotationYawPitchRollToRef(yaw, pitch, roll, result);\n return result;\n }\n Matrix.rotationYawPitchRoll = rotationYawPitchRoll;\n /**\n * Creates a rotation matrix and stores it in a given matrix\n * @param yaw - defines the yaw angle in radians (Y axis)\n * @param pitch - defines the pitch angle in radians (X axis)\n * @param roll - defines the roll angle in radians (X axis)\n * @param result - defines the target matrix\n */\n function rotationYawPitchRollToRef(yaw, pitch, roll, result) {\n const quaternionResult = Quaternion.Zero();\n Quaternion.fromRotationYawPitchRollToRef(yaw, pitch, roll, quaternionResult);\n fromQuaternionToRef(quaternionResult, result);\n }\n Matrix.rotationYawPitchRollToRef = rotationYawPitchRollToRef;\n /**\n * Creates a scaling matrix\n * @param x - defines the scale factor on X axis\n * @param y - defines the scale factor on Y axis\n * @param z - defines the scale factor on Z axis\n * @returns the new matrix\n */\n function scaling(x, y, z) {\n const result = create();\n scalingToRef(x, y, z, result);\n return result;\n }\n Matrix.scaling = scaling;\n /**\n * Creates a scaling matrix and stores it in a given matrix\n * @param x - defines the scale factor on X axis\n * @param y - defines the scale factor on Y axis\n * @param z - defines the scale factor on Z axis\n * @param result - defines the target matrix\n */\n function scalingToRef(x, y, z, result) {\n fromValuesToRef(x, 0.0, 0.0, 0.0, 0.0, y, 0.0, 0.0, 0.0, 0.0, z, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n _updateIdentityStatus(result, x === 1 && y === 1 && z === 1);\n }\n Matrix.scalingToRef = scalingToRef;\n /**\n * Creates a translation matrix\n * @param x - defines the translation on X axis\n * @param y - defines the translation on Y axis\n * @param z - defines the translationon Z axis\n * @returns the new matrix\n */\n function translation(x, y, z) {\n const result = create();\n translationToRef(x, y, z, result);\n return result;\n }\n Matrix.translation = translation;\n /**\n * Creates a translation matrix and stores it in a given matrix\n * @param x - defines the translation on X axis\n * @param y - defines the translation on Y axis\n * @param z - defines the translationon Z axis\n * @param result - defines the target matrix\n */\n function translationToRef(x, y, z, result) {\n fromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, x, y, z, 1.0, result);\n _updateIdentityStatus(result, x === 0 && y === 0 && z === 0);\n }\n Matrix.translationToRef = translationToRef;\n /**\n * Returns a new Matrix whose values are the interpolated values for \"gradient\" (float) between the ones of the matrices \"startValue\" and \"endValue\".\n * @param startValue - defines the start value\n * @param endValue - defines the end value\n * @param gradient - defines the gradient factor\n * @returns the new matrix\n */\n function lerp(startValue, endValue, gradient) {\n const result = create();\n lerpToRef(startValue, endValue, gradient, result);\n return result;\n }\n Matrix.lerp = lerp;\n /**\n * Set the given matrix \"result\" as the interpolated values for \"gradient\" (float) between the ones of the matrices \"startValue\" and \"endValue\".\n * @param startValue - defines the start value\n * @param endValue - defines the end value\n * @param gradient - defines the gradient factor\n * @param result - defines the Matrix object where to store data\n */\n function lerpToRef(startValue, endValue, gradient, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] =\n startValue._m[index] * (1.0 - gradient) + endValue._m[index] * gradient;\n }\n _markAsUpdated(result);\n }\n Matrix.lerpToRef = lerpToRef;\n /**\n * Builds a new matrix whose values are computed by:\n * * decomposing the the \"startValue\" and \"endValue\" matrices into their respective scale, rotation and translation matrices\n * * interpolating for \"gradient\" (float) the values between each of these decomposed matrices between the start and the end\n * * recomposing a new matrix from these 3 interpolated scale, rotation and translation matrices\n * @param startValue - defines the first matrix\n * @param endValue - defines the second matrix\n * @param gradient - defines the gradient between the two matrices\n * @returns the new matrix\n */\n function decomposeLerp(startValue, endValue, gradient) {\n const result = create();\n decomposeLerpToRef(startValue, endValue, gradient, result);\n return result;\n }\n Matrix.decomposeLerp = decomposeLerp;\n /**\n * Update a matrix to values which are computed by:\n * * decomposing the the \"startValue\" and \"endValue\" matrices into their respective scale, rotation and translation matrices\n * * interpolating for \"gradient\" (float) the values between each of these decomposed matrices between the start and the end\n * * recomposing a new matrix from these 3 interpolated scale, rotation and translation matrices\n * @param startValue - defines the first matrix\n * @param endValue - defines the second matrix\n * @param gradient - defines the gradient between the two matrices\n * @param result - defines the target matrix\n */\n function decomposeLerpToRef(startValue, endValue, gradient, result) {\n const startScale = Vector3.Zero();\n const startRotation = Quaternion.Zero();\n const startTranslation = Vector3.Zero();\n decompose(startValue, startScale, startRotation, startTranslation);\n const endScale = Vector3.Zero();\n const endRotation = Quaternion.Zero();\n const endTranslation = Vector3.Zero();\n decompose(endValue, endScale, endRotation, endTranslation);\n const resultScale = Vector3.Zero();\n Vector3.lerpToRef(startScale, endScale, gradient, resultScale);\n const resultRotation = Quaternion.Zero();\n Quaternion.slerpToRef(startRotation, endRotation, gradient, resultRotation);\n const resultTranslation = Vector3.Zero();\n Vector3.lerpToRef(startTranslation, endTranslation, gradient, resultTranslation);\n composeToRef(resultScale, resultRotation, resultTranslation, result);\n }\n Matrix.decomposeLerpToRef = decomposeLerpToRef;\n /**\n * Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\"\n * self function works in left handed mode\n * @param eye - defines the final position of the entity\n * @param target - defines where the entity should look at\n * @param up - defines the up vector for the entity\n * @returns the new matrix\n */\n function LookAtLH(eye, target, up) {\n const result = create();\n lookAtLHToRef(eye, target, up, result);\n return result;\n }\n Matrix.LookAtLH = LookAtLH;\n /**\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\".\n * self function works in left handed mode\n * @param eye - defines the final position of the entity\n * @param target - defines where the entity should look at\n * @param up - defines the up vector for the entity\n * @param result - defines the target matrix\n */\n function lookAtLHToRef(eye, target, up, result) {\n const xAxis = Vector3.Zero();\n const yAxis = Vector3.Zero();\n const zAxis = Vector3.Zero();\n // Z axis\n Vector3.subtractToRef(target, eye, zAxis);\n Vector3.normalizeToRef(zAxis, zAxis);\n // X axis\n Vector3.crossToRef(up, zAxis, xAxis);\n const xSquareLength = Vector3.lengthSquared(xAxis);\n if (xSquareLength === 0) {\n xAxis.x = 1.0;\n }\n else {\n Vector3.normalizeFromLengthToRef(xAxis, Math.sqrt(xSquareLength), xAxis);\n }\n // Y axis\n Vector3.crossToRef(zAxis, xAxis, yAxis);\n Vector3.normalizeToRef(yAxis, yAxis);\n // Eye angles\n const ex = -Vector3.dot(xAxis, eye);\n const ey = -Vector3.dot(yAxis, eye);\n const ez = -Vector3.dot(zAxis, eye);\n fromValuesToRef(xAxis.x, yAxis.x, zAxis.x, 0.0, xAxis.y, yAxis.y, zAxis.y, 0.0, xAxis.z, yAxis.z, zAxis.z, 0.0, ex, ey, ez, 1.0, result);\n }\n Matrix.lookAtLHToRef = lookAtLHToRef;\n /**\n * Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\"\n * self function works in right handed mode\n * @param eye - defines the final position of the entity\n * @param target - defines where the entity should look at\n * @param up - defines the up vector for the entity\n * @returns the new matrix\n */\n function lookAtRH(eye, target, up) {\n const result = create();\n lookAtRHToRef(eye, target, up, result);\n return result;\n }\n Matrix.lookAtRH = lookAtRH;\n /**\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\".\n * self function works in right handed mode\n * @param eye - defines the final position of the entity\n * @param target - defines where the entity should look at\n * @param up - defines the up vector for the entity\n * @param result - defines the target matrix\n */\n function lookAtRHToRef(eye, target, up, result) {\n const xAxis = Vector3.Zero();\n const yAxis = Vector3.Zero();\n const zAxis = Vector3.Zero();\n // Z axis\n Vector3.subtractToRef(eye, target, zAxis);\n Vector3.normalizeToRef(zAxis, zAxis);\n // X axis\n Vector3.crossToRef(up, zAxis, xAxis);\n const xSquareLength = Vector3.lengthSquared(xAxis);\n if (xSquareLength === 0) {\n xAxis.x = 1.0;\n }\n else {\n Vector3.normalizeFromLengthToRef(xAxis, Math.sqrt(xSquareLength), xAxis);\n }\n // Y axis\n Vector3.crossToRef(zAxis, xAxis, yAxis);\n Vector3.normalizeToRef(yAxis, yAxis);\n // Eye angles\n const ex = -Vector3.dot(xAxis, eye);\n const ey = -Vector3.dot(yAxis, eye);\n const ez = -Vector3.dot(zAxis, eye);\n fromValuesToRef(xAxis.x, yAxis.x, zAxis.x, 0.0, xAxis.y, yAxis.y, zAxis.y, 0.0, xAxis.z, yAxis.z, zAxis.z, 0.0, ex, ey, ez, 1.0, result);\n }\n Matrix.lookAtRHToRef = lookAtRHToRef;\n /**\n * Create a left-handed orthographic projection matrix\n * @param width - defines the viewport width\n * @param height - defines the viewport height\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a left-handed orthographic projection matrix\n */\n function orthoLH(width, height, znear, zfar) {\n const matrix = create();\n orthoLHToRef(width, height, znear, zfar, matrix);\n return matrix;\n }\n Matrix.orthoLH = orthoLH;\n /**\n * Store a left-handed orthographic projection to a given matrix\n * @param width - defines the viewport width\n * @param height - defines the viewport height\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n */\n function orthoLHToRef(width, height, znear, zfar, result) {\n const n = znear;\n const f = zfar;\n const a = 2.0 / width;\n const b = 2.0 / height;\n const c = 2.0 / (f - n);\n const d = -(f + n) / (f - n);\n fromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 0.0, 0.0, 0.0, d, 1.0, result);\n _updateIdentityStatus(result, a === 1 && b === 1 && c === 1 && d === 0);\n }\n Matrix.orthoLHToRef = orthoLHToRef;\n /**\n * Create a left-handed orthographic projection matrix\n * @param left - defines the viewport left coordinate\n * @param right - defines the viewport right coordinate\n * @param bottom - defines the viewport bottom coordinate\n * @param top - defines the viewport top coordinate\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a left-handed orthographic projection matrix\n */\n function OrthoOffCenterLH(left, right, bottom, top, znear, zfar) {\n const matrix = create();\n orthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, matrix);\n return matrix;\n }\n Matrix.OrthoOffCenterLH = OrthoOffCenterLH;\n /**\n * Stores a left-handed orthographic projection into a given matrix\n * @param left - defines the viewport left coordinate\n * @param right - defines the viewport right coordinate\n * @param bottom - defines the viewport bottom coordinate\n * @param top - defines the viewport top coordinate\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n */\n function orthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, result) {\n const n = znear;\n const f = zfar;\n const a = 2.0 / (right - left);\n const b = 2.0 / (top - bottom);\n const c = 2.0 / (f - n);\n const d = -(f + n) / (f - n);\n const i0 = (left + right) / (left - right);\n const i1 = (top + bottom) / (bottom - top);\n fromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 0.0, i0, i1, d, 1.0, result);\n _markAsUpdated(result);\n }\n Matrix.orthoOffCenterLHToRef = orthoOffCenterLHToRef;\n /**\n * Creates a right-handed orthographic projection matrix\n * @param left - defines the viewport left coordinate\n * @param right - defines the viewport right coordinate\n * @param bottom - defines the viewport bottom coordinate\n * @param top - defines the viewport top coordinate\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a right-handed orthographic projection matrix\n */\n function orthoOffCenterRH(left, right, bottom, top, znear, zfar) {\n const matrix = create();\n orthoOffCenterRHToRef(left, right, bottom, top, znear, zfar, matrix);\n return matrix;\n }\n Matrix.orthoOffCenterRH = orthoOffCenterRH;\n /**\n * Stores a right-handed orthographic projection into a given matrix\n * @param left - defines the viewport left coordinate\n * @param right - defines the viewport right coordinate\n * @param bottom - defines the viewport bottom coordinate\n * @param top - defines the viewport top coordinate\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n */\n function orthoOffCenterRHToRef(left, right, bottom, top, znear, zfar, result) {\n orthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, result);\n result._m[10] *= -1; // No need to call _markAsUpdated as previous function already called it and let _isIdentityDirty to true\n }\n Matrix.orthoOffCenterRHToRef = orthoOffCenterRHToRef;\n /**\n * Creates a left-handed perspective projection matrix\n * @param width - defines the viewport width\n * @param height - defines the viewport height\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a left-handed perspective projection matrix\n */\n function perspectiveLH(width, height, znear, zfar) {\n const matrix = create();\n const n = znear;\n const f = zfar;\n const a = (2.0 * n) / width;\n const b = (2.0 * n) / height;\n const c = (f + n) / (f - n);\n const d = (-2.0 * f * n) / (f - n);\n fromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0, matrix);\n _updateIdentityStatus(matrix, false);\n return matrix;\n }\n Matrix.perspectiveLH = perspectiveLH;\n /**\n * Creates a left-handed perspective projection matrix\n * @param fov - defines the horizontal field of view\n * @param aspect - defines the aspect ratio\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a left-handed perspective projection matrix\n */\n function perspectiveFovLH(fov, aspect, znear, zfar) {\n const matrix = create();\n perspectiveFovLHToRef(fov, aspect, znear, zfar, matrix);\n return matrix;\n }\n Matrix.perspectiveFovLH = perspectiveFovLH;\n /**\n * Stores a left-handed perspective projection into a given matrix\n * @param fov - defines the horizontal field of view\n * @param aspect - defines the aspect ratio\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n * @param isVerticalFovFixed - defines it the fov is vertically fixed (default) or horizontally\n */\n function perspectiveFovLHToRef(fov, aspect, znear, zfar, result, isVerticalFovFixed = true) {\n const n = znear;\n const f = zfar;\n const t = 1.0 / Math.tan(fov * 0.5);\n const a = isVerticalFovFixed ? t / aspect : t;\n const b = isVerticalFovFixed ? t : t * aspect;\n const c = (f + n) / (f - n);\n const d = (-2.0 * f * n) / (f - n);\n fromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0, result);\n _updateIdentityStatus(result, false);\n }\n Matrix.perspectiveFovLHToRef = perspectiveFovLHToRef;\n /**\n * Creates a right-handed perspective projection matrix\n * @param fov - defines the horizontal field of view\n * @param aspect - defines the aspect ratio\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a right-handed perspective projection matrix\n */\n function PerspectiveFovRH(fov, aspect, znear, zfar) {\n const matrix = create();\n perspectiveFovRHToRef(fov, aspect, znear, zfar, matrix);\n return matrix;\n }\n Matrix.PerspectiveFovRH = PerspectiveFovRH;\n /**\n * Stores a right-handed perspective projection into a given matrix\n * @param fov - defines the horizontal field of view\n * @param aspect - defines the aspect ratio\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n * @param isVerticalFovFixed - defines it the fov is vertically fixed (default) or horizontally\n */\n function perspectiveFovRHToRef(fov, aspect, znear, zfar, result, isVerticalFovFixed = true) {\n /* alternatively self could be expressed as:\n // m = PerspectiveFovLHToRef\n // m[10] *= -1.0;\n // m[11] *= -1.0;\n */\n const n = znear;\n const f = zfar;\n const t = 1.0 / Math.tan(fov * 0.5);\n const a = isVerticalFovFixed ? t / aspect : t;\n const b = isVerticalFovFixed ? t : t * aspect;\n const c = -(f + n) / (f - n);\n const d = (-2 * f * n) / (f - n);\n fromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, -1.0, 0.0, 0.0, d, 0.0, result);\n _updateIdentityStatus(result, false);\n }\n Matrix.perspectiveFovRHToRef = perspectiveFovRHToRef;\n /**\n * Stores a perspective projection for WebVR info a given matrix\n * @param fov - defines the field of view\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n * @param rightHanded - defines if the matrix must be in right-handed mode (false by default)\n */\n function perspectiveFovWebVRToRef(fov, znear, zfar, result, rightHanded = false) {\n const rightHandedFactor = rightHanded ? -1 : 1;\n const upTan = Math.tan((fov.upDegrees * Math.PI) / 180.0);\n const downTan = Math.tan((fov.downDegrees * Math.PI) / 180.0);\n const leftTan = Math.tan((fov.leftDegrees * Math.PI) / 180.0);\n const rightTan = Math.tan((fov.rightDegrees * Math.PI) / 180.0);\n const xScale = 2.0 / (leftTan + rightTan);\n const yScale = 2.0 / (upTan + downTan);\n const m = result._m;\n m[0] = xScale;\n m[1] = m[2] = m[3] = m[4] = 0.0;\n m[5] = yScale;\n m[6] = m[7] = 0.0;\n m[8] = (leftTan - rightTan) * xScale * 0.5;\n m[9] = -((upTan - downTan) * yScale * 0.5);\n m[10] = -zfar / (znear - zfar);\n m[11] = 1.0 * rightHandedFactor;\n m[12] = m[13] = m[15] = 0.0;\n m[14] = -(2.0 * zfar * znear) / (zfar - znear);\n _markAsUpdated(result);\n }\n Matrix.perspectiveFovWebVRToRef = perspectiveFovWebVRToRef;\n /**\n * Extracts a 2x2 matrix from a given matrix and store the result in a FloatArray\n * @param matrix - defines the matrix to use\n * @returns a new FloatArray array with 4 elements : the 2x2 matrix extracted from the given matrix\n */\n function GetAsMatrix2x2(matrix) {\n return [matrix._m[0], matrix._m[1], matrix._m[4], matrix._m[5]];\n }\n Matrix.GetAsMatrix2x2 = GetAsMatrix2x2;\n /**\n * Extracts a 3x3 matrix from a given matrix and store the result in a FloatArray\n * @param matrix - defines the matrix to use\n * @returns a new FloatArray array with 9 elements : the 3x3 matrix extracted from the given matrix\n */\n function GetAsMatrix3x3(matrix) {\n return [\n matrix._m[0],\n matrix._m[1],\n matrix._m[2],\n matrix._m[4],\n matrix._m[5],\n matrix._m[6],\n matrix._m[8],\n matrix._m[9],\n matrix._m[10]\n ];\n }\n Matrix.GetAsMatrix3x3 = GetAsMatrix3x3;\n /**\n * Compute the transpose of a given matrix\n * @param matrix - defines the matrix to transpose\n * @returns the new matrix\n */\n function transpose(matrix) {\n const result = create();\n transposeToRef(matrix, result);\n return result;\n }\n Matrix.transpose = transpose;\n /**\n * Compute the transpose of a matrix and store it in a target matrix\n * @param matrix - defines the matrix to transpose\n * @param result - defines the target matrix\n */\n function transposeToRef(matrix, result) {\n const rm = result._m;\n const mm = matrix._m;\n rm[0] = mm[0];\n rm[1] = mm[4];\n rm[2] = mm[8];\n rm[3] = mm[12];\n rm[4] = mm[1];\n rm[5] = mm[5];\n rm[6] = mm[9];\n rm[7] = mm[13];\n rm[8] = mm[2];\n rm[9] = mm[6];\n rm[10] = mm[10];\n rm[11] = mm[14];\n rm[12] = mm[3];\n rm[13] = mm[7];\n rm[14] = mm[11];\n rm[15] = mm[15];\n // identity-ness does not change when transposing\n _updateIdentityStatus(result, matrix.isIdentity, matrix._isIdentityDirty);\n }\n Matrix.transposeToRef = transposeToRef;\n /**\n * Computes a reflection matrix from a plane\n * @param plane - defines the reflection plane\n * @returns a new matrix\n */\n function reflection(plane) {\n const matrix = create();\n reflectionToRef(plane, matrix);\n return matrix;\n }\n Matrix.reflection = reflection;\n /**\n * Computes a reflection matrix from a plane\n * @param plane - defines the reflection plane\n * @param result - defines the target matrix\n */\n function reflectionToRef(_plane, result) {\n const plane = Plane.normalize(_plane);\n const x = plane.normal.x;\n const y = plane.normal.y;\n const z = plane.normal.z;\n const temp = -2 * x;\n const temp2 = -2 * y;\n const temp3 = -2 * z;\n fromValuesToRef(temp * x + 1, temp2 * x, temp3 * x, 0.0, temp * y, temp2 * y + 1, temp3 * y, 0.0, temp * z, temp2 * z, temp3 * z + 1, 0.0, temp * plane.d, temp2 * plane.d, temp3 * plane.d, 1.0, result);\n }\n Matrix.reflectionToRef = reflectionToRef;\n /**\n * Sets the given matrix as a rotation matrix composed from the 3 left handed axes\n * @param xaxis - defines the value of the 1st axis\n * @param yaxis - defines the value of the 2nd axis\n * @param zaxis - defines the value of the 3rd axis\n * @param result - defines the target matrix\n */\n function fromXYZAxesToRef(xaxis, yaxis, zaxis, result) {\n fromValuesToRef(xaxis.x, xaxis.y, xaxis.z, 0.0, yaxis.x, yaxis.y, yaxis.z, 0.0, zaxis.x, zaxis.y, zaxis.z, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n }\n Matrix.fromXYZAxesToRef = fromXYZAxesToRef;\n /**\n * Creates a rotation matrix from a quaternion and stores it in a target matrix\n * @param quat - defines the quaternion to use\n * @param result - defines the target matrix\n */\n function fromQuaternionToRef(quat, result) {\n const xx = quat.x * quat.x;\n const yy = quat.y * quat.y;\n const zz = quat.z * quat.z;\n const xy = quat.x * quat.y;\n const zw = quat.z * quat.w;\n const zx = quat.z * quat.x;\n const yw = quat.y * quat.w;\n const yz = quat.y * quat.z;\n const xw = quat.x * quat.w;\n result._m[0] = 1.0 - 2.0 * (yy + zz);\n result._m[1] = 2.0 * (xy + zw);\n result._m[2] = 2.0 * (zx - yw);\n result._m[3] = 0.0;\n result._m[4] = 2.0 * (xy - zw);\n result._m[5] = 1.0 - 2.0 * (zz + xx);\n result._m[6] = 2.0 * (yz + xw);\n result._m[7] = 0.0;\n result._m[8] = 2.0 * (zx + yw);\n result._m[9] = 2.0 * (yz - xw);\n result._m[10] = 1.0 - 2.0 * (yy + xx);\n result._m[11] = 0.0;\n result._m[12] = 0.0;\n result._m[13] = 0.0;\n result._m[14] = 0.0;\n result._m[15] = 1.0;\n _markAsUpdated(result);\n }\n Matrix.fromQuaternionToRef = fromQuaternionToRef;\n /** @internal */\n function _markAsUpdated(self) {\n self.updateFlag = _updateFlagSeed++;\n self.isIdentity = false;\n self.isIdentity3x2 = false;\n self._isIdentityDirty = true;\n self._isIdentity3x2Dirty = true;\n }\n // Properties\n /**\n * Check if the current matrix is identity\n * @returns true is the matrix is the identity matrix\n */\n function isIdentityUpdate(self) {\n if (self._isIdentityDirty) {\n self._isIdentityDirty = false;\n const m = self._m;\n self.isIdentity =\n m[0] === 1.0 &&\n m[1] === 0.0 &&\n m[2] === 0.0 &&\n m[3] === 0.0 &&\n m[4] === 0.0 &&\n m[5] === 1.0 &&\n m[6] === 0.0 &&\n m[7] === 0.0 &&\n m[8] === 0.0 &&\n m[9] === 0.0 &&\n m[10] === 1.0 &&\n m[11] === 0.0 &&\n m[12] === 0.0 &&\n m[13] === 0.0 &&\n m[14] === 0.0 &&\n m[15] === 1.0;\n }\n return self.isIdentity;\n }\n Matrix.isIdentityUpdate = isIdentityUpdate;\n /**\n * Check if the current matrix is identity as a texture matrix (3x2 store in 4x4)\n * @returns true is the matrix is the identity matrix\n */\n function isIdentityAs3x2Update(self) {\n if (self._isIdentity3x2Dirty) {\n self._isIdentity3x2Dirty = false;\n if (self._m[0] !== 1.0 || self._m[5] !== 1.0 || self._m[15] !== 1.0) {\n self.isIdentity3x2 = false;\n }\n else if (self._m[1] !== 0.0 ||\n self._m[2] !== 0.0 ||\n self._m[3] !== 0.0 ||\n self._m[4] !== 0.0 ||\n self._m[6] !== 0.0 ||\n self._m[7] !== 0.0 ||\n self._m[8] !== 0.0 ||\n self._m[9] !== 0.0 ||\n self._m[10] !== 0.0 ||\n self._m[11] !== 0.0 ||\n self._m[12] !== 0.0 ||\n self._m[13] !== 0.0 ||\n self._m[14] !== 0.0) {\n self.isIdentity3x2 = false;\n }\n else {\n self.isIdentity3x2 = true;\n }\n }\n return self.isIdentity3x2;\n }\n Matrix.isIdentityAs3x2Update = isIdentityAs3x2Update;\n /**\n * Gets the determinant of the matrix\n * @returns the matrix determinant\n */\n function determinant(self) {\n if (self.isIdentity === true) {\n return 1;\n }\n const m = self._m;\n // tslint:disable-next-line:one-variable-per-declaration\n const m00 = m[0], m01 = m[1], m02 = m[2], m03 = m[3];\n // tslint:disable-next-line:one-variable-per-declaration\n const m10 = m[4], m11 = m[5], m12 = m[6], m13 = m[7];\n // tslint:disable-next-line:one-variable-per-declaration\n const m20 = m[8], m21 = m[9], m22 = m[10], m23 = m[11];\n // tslint:disable-next-line:one-variable-per-declaration\n const m30 = m[12], m31 = m[13], m32 = m[14], m33 = m[15];\n /*\n // https://en.wikipedia.org/wiki/Laplace_expansion\n // to compute the deterrminant of a 4x4 Matrix we compute the cofactors of any row or column,\n // then we multiply each Cofactor by its corresponding matrix value and sum them all to get the determinant\n // Cofactor(i, j) = sign(i,j) * det(Minor(i, j))\n // where\n // - sign(i,j) = (i+j) % 2 === 0 ? 1 : -1\n // - Minor(i, j) is the 3x3 matrix we get by removing row i and column j from current Matrix\n //\n // Here we do that for the 1st row.\n */\n // tslint:disable:variable-name\n const det_22_33 = m22 * m33 - m32 * m23;\n const det_21_33 = m21 * m33 - m31 * m23;\n const det_21_32 = m21 * m32 - m31 * m22;\n const det_20_33 = m20 * m33 - m30 * m23;\n const det_20_32 = m20 * m32 - m22 * m30;\n const det_20_31 = m20 * m31 - m30 * m21;\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\n // tslint:enable:variable-name\n return m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\n }\n Matrix.determinant = determinant;\n // Methods\n /**\n * Returns the matrix as a FloatArray\n * @returns the matrix underlying array\n */\n function toArray(self) {\n return self._m;\n }\n Matrix.toArray = toArray;\n /**\n * Returns the matrix as a FloatArray\n * @returns the matrix underlying array.\n */\n function asArray(self) {\n return self._m;\n }\n Matrix.asArray = asArray;\n /**\n * Sets all the matrix elements to zero\n * @returns the current matrix\n */\n function reset(self) {\n fromValuesToRef(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, self);\n _updateIdentityStatus(self, false);\n }\n Matrix.reset = reset;\n /**\n * Adds the current matrix with a second one\n * @param other - defines the matrix to add\n * @returns a new matrix as the addition of the current matrix and the given one\n */\n function add(self, other) {\n const result = create();\n addToRef(self, other, result);\n return result;\n }\n Matrix.add = add;\n /**\n * Sets the given matrix \"result\" to the addition of the current matrix and the given one\n * @param other - defines the matrix to add\n * @param result - defines the target matrix\n * @returns the current matrix\n */\n function addToRef(self, other, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] = self._m[index] + other._m[index];\n }\n _markAsUpdated(result);\n }\n Matrix.addToRef = addToRef;\n /**\n * Adds in place the given matrix to the current matrix\n * @param other - defines the second operand\n * @returns the current updated matrix\n */\n function addToSelf(self, other) {\n for (let index = 0; index < 16; index++) {\n self._m[index] += other._m[index];\n }\n _markAsUpdated(self);\n }\n Matrix.addToSelf = addToSelf;\n /**\n * Creates a new matrix as the invert of a given matrix\n * @param source - defines the source matrix\n * @returns the new matrix\n */\n function invert(source) {\n const result = create();\n invertToRef(source, result);\n return result;\n }\n Matrix.invert = invert;\n /**\n * Sets the given matrix to the current inverted Matrix\n * @param other - defines the target matrix\n * @returns the unmodified current matrix\n */\n function invertToRef(source, result) {\n if (source.isIdentity === true) {\n copy(source, result);\n return;\n }\n // the inverse of a Matrix is the transpose of cofactor matrix divided by the determinant\n const m = source._m;\n // tslint:disable:one-variable-per-declaration\n const m00 = m[0], m01 = m[1], m02 = m[2], m03 = m[3];\n const m10 = m[4], m11 = m[5], m12 = m[6], m13 = m[7];\n const m20 = m[8], m21 = m[9], m22 = m[10], m23 = m[11];\n const m30 = m[12], m31 = m[13], m32 = m[14], m33 = m[15];\n // tslint:enable:one-variable-per-declaration\n // tslint:disable:variable-name\n const det_22_33 = m22 * m33 - m32 * m23;\n const det_21_33 = m21 * m33 - m31 * m23;\n const det_21_32 = m21 * m32 - m31 * m22;\n const det_20_33 = m20 * m33 - m30 * m23;\n const det_20_32 = m20 * m32 - m22 * m30;\n const det_20_31 = m20 * m31 - m30 * m21;\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\n const det = m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\n if (det === 0) {\n copy(source, result);\n return;\n }\n const detInv = 1 / det;\n const det_12_33 = m12 * m33 - m32 * m13;\n const det_11_33 = m11 * m33 - m31 * m13;\n const det_11_32 = m11 * m32 - m31 * m12;\n const det_10_33 = m10 * m33 - m30 * m13;\n const det_10_32 = m10 * m32 - m30 * m12;\n const det_10_31 = m10 * m31 - m30 * m11;\n const det_12_23 = m12 * m23 - m22 * m13;\n const det_11_23 = m11 * m23 - m21 * m13;\n const det_11_22 = m11 * m22 - m21 * m12;\n const det_10_23 = m10 * m23 - m20 * m13;\n const det_10_22 = m10 * m22 - m20 * m12;\n const det_10_21 = m10 * m21 - m20 * m11;\n const cofact_10 = -(m01 * det_22_33 - m02 * det_21_33 + m03 * det_21_32);\n const cofact_11 = +(m00 * det_22_33 - m02 * det_20_33 + m03 * det_20_32);\n const cofact_12 = -(m00 * det_21_33 - m01 * det_20_33 + m03 * det_20_31);\n const cofact_13 = +(m00 * det_21_32 - m01 * det_20_32 + m02 * det_20_31);\n const cofact_20 = +(m01 * det_12_33 - m02 * det_11_33 + m03 * det_11_32);\n const cofact_21 = -(m00 * det_12_33 - m02 * det_10_33 + m03 * det_10_32);\n const cofact_22 = +(m00 * det_11_33 - m01 * det_10_33 + m03 * det_10_31);\n const cofact_23 = -(m00 * det_11_32 - m01 * det_10_32 + m02 * det_10_31);\n const cofact_30 = -(m01 * det_12_23 - m02 * det_11_23 + m03 * det_11_22);\n const cofact_31 = +(m00 * det_12_23 - m02 * det_10_23 + m03 * det_10_22);\n const cofact_32 = -(m00 * det_11_23 - m01 * det_10_23 + m03 * det_10_21);\n const cofact_33 = +(m00 * det_11_22 - m01 * det_10_22 + m02 * det_10_21);\n fromValuesToRef(cofact_00 * detInv, cofact_10 * detInv, cofact_20 * detInv, cofact_30 * detInv, cofact_01 * detInv, cofact_11 * detInv, cofact_21 * detInv, cofact_31 * detInv, cofact_02 * detInv, cofact_12 * detInv, cofact_22 * detInv, cofact_32 * detInv, cofact_03 * detInv, cofact_13 * detInv, cofact_23 * detInv, cofact_33 * detInv, result);\n // tslint:enable:variable-name\n }\n Matrix.invertToRef = invertToRef;\n /**\n * add a value at the specified position in the current Matrix\n * @param index - the index of the value within the matrix. between 0 and 15.\n * @param value - the value to be added\n * @returns the current updated matrix\n */\n function addAtIndex(self, index, value) {\n self._m[index] += value;\n _markAsUpdated(self);\n }\n Matrix.addAtIndex = addAtIndex;\n /**\n * mutiply the specified position in the current Matrix by a value\n * @param index - the index of the value within the matrix. between 0 and 15.\n * @param value - the value to be added\n * @returns the current updated matrix\n */\n function multiplyAtIndex(self, index, value) {\n self._m[index] *= value;\n _markAsUpdated(self);\n return self;\n }\n Matrix.multiplyAtIndex = multiplyAtIndex;\n /**\n * Inserts the translation vector (using 3 floats) in the current matrix\n * @param x - defines the 1st component of the translation\n * @param y - defines the 2nd component of the translation\n * @param z - defines the 3rd component of the translation\n * @returns the current updated matrix\n */\n function setTranslationFromFloats(self, x, y, z) {\n self._m[12] = x;\n self._m[13] = y;\n self._m[14] = z;\n _markAsUpdated(self);\n }\n Matrix.setTranslationFromFloats = setTranslationFromFloats;\n /**\n * Inserts the translation vector in the current matrix\n * @param vector3 - defines the translation to insert\n * @returns the current updated matrix\n */\n function setTranslation(self, vector3) {\n setTranslationFromFloats(self, vector3.x, vector3.y, vector3.z);\n }\n Matrix.setTranslation = setTranslation;\n /**\n * Gets the translation value of the current matrix\n * @returns a new Vector3 as the extracted translation from the matrix\n */\n function getTranslation(self) {\n return Vector3.create(self._m[12], self._m[13], self._m[14]);\n }\n Matrix.getTranslation = getTranslation;\n /**\n * Fill a Vector3 with the extracted translation from the matrix\n * @param result - defines the Vector3 where to store the translation\n * @returns the current matrix\n */\n function getTranslationToRef(self, result) {\n result.x = self._m[12];\n result.y = self._m[13];\n result.z = self._m[14];\n }\n Matrix.getTranslationToRef = getTranslationToRef;\n /**\n * Remove rotation and scaling part from the matrix\n * @returns the updated matrix\n */\n function removeRotationAndScaling(self) {\n const m = self._m;\n fromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, m[12], m[13], m[14], m[15], self);\n _updateIdentityStatus(self, m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1);\n return self;\n }\n Matrix.removeRotationAndScaling = removeRotationAndScaling;\n /**\n * Multiply two matrices\n * @param other - defines the second operand\n * @returns a new matrix set with the multiplication result of the current Matrix and the given one\n */\n function multiply(self, other) {\n const result = create();\n multiplyToRef(self, other, result);\n return result;\n }\n Matrix.multiply = multiply;\n /**\n * Copy the current matrix from the given one\n * @param other - defines the source matrix\n * @returns the current updated matrix\n */\n function copy(from, dest) {\n copyToArray(from, dest._m);\n _updateIdentityStatus(dest, from.isIdentity, from._isIdentityDirty, from.isIdentity3x2, from._isIdentity3x2Dirty);\n }\n Matrix.copy = copy;\n /**\n * Populates the given array from the starting index with the current matrix values\n * @param array - defines the target array\n * @param offset - defines the offset in the target array where to start storing values\n * @returns the current matrix\n */\n function copyToArray(self, arrayDest, offsetDest = 0) {\n for (let index = 0; index < 16; index++) {\n arrayDest[offsetDest + index] = self._m[index];\n }\n }\n Matrix.copyToArray = copyToArray;\n /**\n * Sets the given matrix \"result\" with the multiplication result of the current Matrix and the given one\n * @param other - defines the second operand\n * @param result - defines the matrix where to store the multiplication\n * @returns the current matrix\n */\n function multiplyToRef(self, other, result) {\n if (self.isIdentity) {\n copy(other, result);\n return;\n }\n if (other.isIdentity) {\n copy(self, result);\n return;\n }\n multiplyToArray(self, other, result._m, 0);\n _markAsUpdated(result);\n }\n Matrix.multiplyToRef = multiplyToRef;\n /**\n * Sets the FloatArray \"result\" from the given index \"offset\" with the multiplication of the current matrix and the given one\n * @param other - defines the second operand\n * @param result - defines the array where to store the multiplication\n * @param offset - defines the offset in the target array where to start storing values\n * @returns the current matrix\n */\n function multiplyToArray(self, other, result, offset) {\n const m = self._m;\n const otherM = other._m;\n // tslint:disable:one-variable-per-declaration\n const tm0 = m[0], tm1 = m[1], tm2 = m[2], tm3 = m[3];\n const tm4 = m[4], tm5 = m[5], tm6 = m[6], tm7 = m[7];\n const tm8 = m[8], tm9 = m[9], tm10 = m[10], tm11 = m[11];\n const tm12 = m[12], tm13 = m[13], tm14 = m[14], tm15 = m[15];\n const om0 = otherM[0], om1 = otherM[1], om2 = otherM[2], om3 = otherM[3];\n const om4 = otherM[4], om5 = otherM[5], om6 = otherM[6], om7 = otherM[7];\n const om8 = otherM[8], om9 = otherM[9], om10 = otherM[10], om11 = otherM[11];\n const om12 = otherM[12], om13 = otherM[13], om14 = otherM[14], om15 = otherM[15];\n // tslint:enable:one-variable-per-declaration\n result[offset] = tm0 * om0 + tm1 * om4 + tm2 * om8 + tm3 * om12;\n result[offset + 1] = tm0 * om1 + tm1 * om5 + tm2 * om9 + tm3 * om13;\n result[offset + 2] = tm0 * om2 + tm1 * om6 + tm2 * om10 + tm3 * om14;\n result[offset + 3] = tm0 * om3 + tm1 * om7 + tm2 * om11 + tm3 * om15;\n result[offset + 4] = tm4 * om0 + tm5 * om4 + tm6 * om8 + tm7 * om12;\n result[offset + 5] = tm4 * om1 + tm5 * om5 + tm6 * om9 + tm7 * om13;\n result[offset + 6] = tm4 * om2 + tm5 * om6 + tm6 * om10 + tm7 * om14;\n result[offset + 7] = tm4 * om3 + tm5 * om7 + tm6 * om11 + tm7 * om15;\n result[offset + 8] = tm8 * om0 + tm9 * om4 + tm10 * om8 + tm11 * om12;\n result[offset + 9] = tm8 * om1 + tm9 * om5 + tm10 * om9 + tm11 * om13;\n result[offset + 10] = tm8 * om2 + tm9 * om6 + tm10 * om10 + tm11 * om14;\n result[offset + 11] = tm8 * om3 + tm9 * om7 + tm10 * om11 + tm11 * om15;\n result[offset + 12] = tm12 * om0 + tm13 * om4 + tm14 * om8 + tm15 * om12;\n result[offset + 13] = tm12 * om1 + tm13 * om5 + tm14 * om9 + tm15 * om13;\n result[offset + 14] = tm12 * om2 + tm13 * om6 + tm14 * om10 + tm15 * om14;\n result[offset + 15] = tm12 * om3 + tm13 * om7 + tm14 * om11 + tm15 * om15;\n }\n Matrix.multiplyToArray = multiplyToArray;\n /**\n * Check equality between self matrix and a second one\n * @param value - defines the second matrix to compare\n * @returns true is the current matrix and the given one values are strictly equal\n */\n function equals(self, value) {\n const other = value;\n if (!other) {\n return false;\n }\n if (self.isIdentity || other.isIdentity) {\n if (!self._isIdentityDirty && !other._isIdentityDirty) {\n return self.isIdentity && other.isIdentity;\n }\n }\n const m = self._m;\n const om = other._m;\n return (m[0] === om[0] &&\n m[1] === om[1] &&\n m[2] === om[2] &&\n m[3] === om[3] &&\n m[4] === om[4] &&\n m[5] === om[5] &&\n m[6] === om[6] &&\n m[7] === om[7] &&\n m[8] === om[8] &&\n m[9] === om[9] &&\n m[10] === om[10] &&\n m[11] === om[11] &&\n m[12] === om[12] &&\n m[13] === om[13] &&\n m[14] === om[14] &&\n m[15] === om[15]);\n }\n Matrix.equals = equals;\n /**\n * Clone the current matrix\n * @returns a new matrix from the current matrix\n */\n function clone(self) {\n const result = create();\n copy(self, result);\n return result;\n }\n Matrix.clone = clone;\n /**\n * Gets the hash code of the current matrix\n * @returns the hash code\n */\n function getHashCode(self) {\n let hash = self._m[0] || 0;\n for (let i = 1; i < 16; i++) {\n hash = (hash * 397) ^ (self._m[i] || 0);\n }\n return hash;\n }\n Matrix.getHashCode = getHashCode;\n /**\n * Decomposes the current Matrix into a translation, rotation and scaling components\n * @param scale - defines the scale vector3 given as a reference to update\n * @param rotation - defines the rotation quaternion given as a reference to update\n * @param translation - defines the translation vector3 given as a reference to update\n * @returns true if operation was successful\n */\n function decompose(self, scale, rotation, translation) {\n if (self.isIdentity) {\n if (translation) {\n translation.x = 0;\n translation.y = 0;\n translation.z = 0;\n }\n if (scale) {\n scale.x = 1;\n scale.y = 1;\n scale.z = 1;\n }\n if (rotation) {\n rotation.w = 1;\n rotation.x = 0;\n rotation.y = 0;\n rotation.z = 0;\n }\n return true;\n }\n const m = self._m;\n if (translation) {\n translation.x = m[12];\n translation.y = m[13];\n translation.z = m[14];\n }\n const usedScale = scale || Vector3.Zero();\n usedScale.x = Math.sqrt(m[0] * m[0] + m[1] * m[1] + m[2] * m[2]);\n usedScale.y = Math.sqrt(m[4] * m[4] + m[5] * m[5] + m[6] * m[6]);\n usedScale.z = Math.sqrt(m[8] * m[8] + m[9] * m[9] + m[10] * m[10]);\n if (determinant(self) <= 0) {\n usedScale.y *= -1;\n }\n if (usedScale.x === 0 || usedScale.y === 0 || usedScale.z === 0) {\n if (rotation) {\n rotation.w = 1;\n rotation.x = 0;\n rotation.y = 0;\n rotation.z = 0;\n }\n return false;\n }\n if (rotation) {\n // tslint:disable-next-line:one-variable-per-declaration\n const sx = 1 / usedScale.x, sy = 1 / usedScale.y, sz = 1 / usedScale.z;\n const tmpMatrix = create();\n fromValuesToRef(m[0] * sx, m[1] * sx, m[2] * sx, 0.0, m[4] * sy, m[5] * sy, m[6] * sy, 0.0, m[8] * sz, m[9] * sz, m[10] * sz, 0.0, 0.0, 0.0, 0.0, 1.0, tmpMatrix);\n Quaternion.fromRotationMatrixToRef(tmpMatrix, rotation);\n }\n return true;\n }\n Matrix.decompose = decompose;\n /**\n * Gets specific row of the matrix\n * @param index - defines the number of the row to get\n * @returns the index-th row of the current matrix as a new Vector4\n */\n // TODO\n // export function getRow(index: number): Nullable {\n // if (index < 0 || index > 3) {\n // return null\n // }\n // const i = index * 4\n // return new Vector4(\n // self._m[i + 0],\n // self._m[i + 1],\n // self._m[i + 2],\n // self._m[i + 3]\n // )\n // }\n /**\n * Sets the index-th row of the current matrix to the vector4 values\n * @param index - defines the number of the row to set\n * @param row - defines the target vector4\n * @returns the updated current matrix\n */\n // TODO\n // export function setRow(index: number, row: Vector4): MutableMatrix {\n // return setRowFromFloats(index, row.x, row.y, row.z, row.w)\n // }\n /**\n * Sets the index-th row of the current matrix with the given 4 x float values\n * @param index - defines the row index\n * @param x - defines the x component to set\n * @param y - defines the y component to set\n * @param z - defines the z component to set\n * @param w - defines the w component to set\n * @returns the updated current matrix\n */\n function setRowFromFloats(self, index, x, y, z, w) {\n if (index < 0 || index > 3) {\n return;\n }\n const i = index * 4;\n self._m[i + 0] = x;\n self._m[i + 1] = y;\n self._m[i + 2] = z;\n self._m[i + 3] = w;\n _markAsUpdated(self);\n }\n Matrix.setRowFromFloats = setRowFromFloats;\n /**\n * Compute a new matrix set with the current matrix values multiplied by scale (float)\n * @param scale - defines the scale factor\n * @returns a new matrix\n */\n function scale(self, scale) {\n const result = create();\n scaleToRef(self, scale, result);\n return result;\n }\n Matrix.scale = scale;\n /**\n * Scale the current matrix values by a factor to a given result matrix\n * @param scale - defines the scale factor\n * @param result - defines the matrix to store the result\n * @returns the current matrix\n */\n function scaleToRef(self, scale, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] = self._m[index] * scale;\n }\n _markAsUpdated(result);\n }\n Matrix.scaleToRef = scaleToRef;\n /**\n * Scale the current matrix values by a factor and add the result to a given matrix\n * @param scale - defines the scale factor\n * @param result - defines the Matrix to store the result\n * @returns the current matrix\n */\n function scaleAndAddToRef(self, scale, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] += self._m[index] * scale;\n }\n _markAsUpdated(result);\n }\n Matrix.scaleAndAddToRef = scaleAndAddToRef;\n /**\n * Writes to the given matrix a normal matrix, computed from self one (using values from identity matrix for fourth row and column).\n * @param ref - matrix to store the result\n */\n function normalMatrixToRef(self, ref) {\n const tmp = create();\n invertToRef(self, tmp);\n transposeToRef(tmp, ref);\n const m = ref._m;\n fromValuesToRef(m[0], m[1], m[2], 0.0, m[4], m[5], m[6], 0.0, m[8], m[9], m[10], 0.0, 0.0, 0.0, 0.0, 1.0, ref);\n }\n Matrix.normalMatrixToRef = normalMatrixToRef;\n /**\n * Gets only rotation part of the current matrix\n * @returns a new matrix sets to the extracted rotation matrix from the current one\n */\n function getRotationMatrix(self) {\n const result = create();\n getRotationMatrixToRef(self, result);\n return result;\n }\n Matrix.getRotationMatrix = getRotationMatrix;\n /**\n * Extracts the rotation matrix from the current one and sets it as the given \"result\"\n * @param result - defines the target matrix to store data to\n * @returns the current matrix\n */\n function getRotationMatrixToRef(self, result) {\n const scale = Vector3.Zero();\n if (!decompose(self, scale)) {\n result = Identity();\n return;\n }\n const m = self._m;\n // tslint:disable-next-line:one-variable-per-declaration\n const sx = 1 / scale.x, sy = 1 / scale.y, sz = 1 / scale.z;\n fromValuesToRef(m[0] * sx, m[1] * sx, m[2] * sx, 0.0, m[4] * sy, m[5] * sy, m[6] * sy, 0.0, m[8] * sz, m[9] * sz, m[10] * sz, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n }\n Matrix.getRotationMatrixToRef = getRotationMatrixToRef;\n /**\n * Toggles model matrix from being right handed to left handed in place and vice versa\n */\n function toggleModelMatrixHandInPlace(self) {\n self._m[2] *= -1;\n self._m[6] *= -1;\n self._m[8] *= -1;\n self._m[9] *= -1;\n self._m[14] *= -1;\n _markAsUpdated(self);\n }\n Matrix.toggleModelMatrixHandInPlace = toggleModelMatrixHandInPlace;\n /**\n * Toggles projection matrix from being right handed to left handed in place and vice versa\n */\n function toggleProjectionMatrixHandInPlace(self) {\n self._m[8] *= -1;\n self._m[9] *= -1;\n self._m[10] *= -1;\n self._m[11] *= -1;\n _markAsUpdated(self);\n }\n Matrix.toggleProjectionMatrixHandInPlace = toggleProjectionMatrixHandInPlace;\n /** @internal */\n function _updateIdentityStatus(self, isIdentity, isIdentityDirty = false, isIdentity3x2 = false, isIdentity3x2Dirty = true) {\n self.updateFlag = _updateFlagSeed++;\n self.isIdentity = isIdentity;\n self.isIdentity3x2 = isIdentity || isIdentity3x2;\n self._isIdentityDirty = self.isIdentity ? false : isIdentityDirty;\n self._isIdentity3x2Dirty = self.isIdentity3x2 ? false : isIdentity3x2Dirty;\n }\n})(Matrix || (Matrix = {}));\n", "import { Vector3 } from './Vector3';\nimport { Scalar } from './Scalar';\nimport { DEG2RAD, RAD2DEG } from './types';\nimport { Matrix } from './Matrix';\n/**\n * @public\n * Quaternion is a type and a namespace.\n * ```\n * // The namespace contains all types and functions to operates with Quaternion\n * const next = Quaternion.add(pointA, velocityA)\n * // The type Quaternion is an alias to Quaternion.ReadonlyQuaternion\n * const readonlyRotation: Quaternion = Quaternion.Zero()\n * readonlyRotation.x = 0.1 // this FAILS\n *\n * // For mutable usage, use `Quaternion.Mutable`\n * const rotation: Quaternion.Mutable = Quaternion.Identity()\n * rotation.x = 3.0 // this WORKS\n * ```\n */\nexport var Quaternion;\n(function (Quaternion) {\n /**\n * Creates a new Quaternion from the given floats\n * @param x - defines the first component (0 by default)\n * @param y - defines the second component (0 by default)\n * @param z - defines the third component (0 by default)\n * @param w - defines the fourth component (1.0 by default)\n */\n function create(\n /** defines the first component (0 by default) */\n x = 0.0, \n /** defines the second component (0 by default) */\n y = 0.0, \n /** defines the third component (0 by default) */\n z = 0.0, \n /** defines the fourth component (1.0 by default) */\n w = 1.0) {\n return { x, y, z, w };\n }\n Quaternion.create = create;\n /**\n * Returns a new Quaternion as the result of the addition of the two given quaternions.\n * @param q1 - the first quaternion\n * @param q2 - the second quaternion\n * @returns the resulting quaternion\n */\n function add(q1, q2) {\n return { x: q1.x + q2.x, y: q1.y + q2.y, z: q1.z + q2.z, w: q1.w + q2.w };\n }\n Quaternion.add = add;\n /**\n * Creates a new rotation from the given Euler float angles (y, x, z) and stores it in the target quaternion\n * @param yaw - defines the rotation around Y axis (radians)\n * @param pitch - defines the rotation around X axis (radians)\n * @param roll - defines the rotation around Z axis (radians)\n * @returns result quaternion\n */\n function fromRotationYawPitchRoll(yaw, pitch, roll) {\n // Implemented unity-based calculations from: https://stackoverflow.com/a/56055813\n const halfPitch = pitch * 0.5;\n const halfYaw = yaw * 0.5;\n const halfRoll = roll * 0.5;\n const c1 = Math.cos(halfPitch);\n const c2 = Math.cos(halfYaw);\n const c3 = Math.cos(halfRoll);\n const s1 = Math.sin(halfPitch);\n const s2 = Math.sin(halfYaw);\n const s3 = Math.sin(halfRoll);\n return create(c2 * s1 * c3 + s2 * c1 * s3, s2 * c1 * c3 - c2 * s1 * s3, c2 * c1 * s3 - s2 * s1 * c3, c2 * c1 * c3 + s2 * s1 * s3);\n }\n Quaternion.fromRotationYawPitchRoll = fromRotationYawPitchRoll;\n /**\n * Returns a rotation that rotates z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis.\n * @param x - the rotation on the x axis in euler degrees\n * @param y - the rotation on the y axis in euler degrees\n * @param z - the rotation on the z axis in euler degrees\n */\n function fromEulerDegrees(x, y, z) {\n return fromRotationYawPitchRoll(y * DEG2RAD, x * DEG2RAD, z * DEG2RAD);\n }\n Quaternion.fromEulerDegrees = fromEulerDegrees;\n /**\n * Gets length of current quaternion\n * @returns the quaternion length (float)\n */\n function length(q) {\n return Math.sqrt(lengthSquared(q));\n }\n Quaternion.length = length;\n /**\n * Gets length of current quaternion\n * @returns the quaternion length (float)\n */\n function lengthSquared(q) {\n return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w;\n }\n Quaternion.lengthSquared = lengthSquared;\n /**\n * Returns the dot product (float) between the quaternions \"left\" and \"right\"\n * @param left - defines the left operand\n * @param right - defines the right operand\n * @returns the dot product\n */\n function dot(left, right) {\n return (left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w);\n }\n Quaternion.dot = dot;\n /**\n * Returns the angle in degrees between two rotations a and b.\n * @param quat1 - defines the first quaternion\n * @param quat2 - defines the second quaternion\n * @returns the degrees angle\n */\n function angle(quat1, quat2) {\n const dotVal = dot(quat1, quat2);\n return Math.acos(Math.min(Math.abs(dotVal), 1)) * 2 * RAD2DEG;\n }\n Quaternion.angle = angle;\n /**\n * The from quaternion is rotated towards to by an angular step of maxDegreesDelta.\n * @param from - defines the first quaternion\n * @param to - defines the second quaternion\n * @param maxDegreesDelta - the interval step\n */\n function rotateTowards(from, to, maxDegreesDelta) {\n const num = angle(from, to);\n if (num === 0) {\n return to;\n }\n const t = Math.min(1, maxDegreesDelta / num);\n return slerp(from, to, t);\n }\n Quaternion.rotateTowards = rotateTowards;\n /**\n * Creates a rotation with the specified forward and upwards directions.\n * @param forward - the direction to look in\n * @param up - the vector that defines in which direction up is\n */\n function lookRotation(forward, up = { x: 0.0, y: 1.0, z: 0.0 }) {\n const forwardNew = Vector3.normalize(forward);\n const right = Vector3.normalize(Vector3.cross(up, forwardNew));\n const upNew = Vector3.cross(forwardNew, right);\n const m00 = right.x;\n const m01 = right.y;\n const m02 = right.z;\n const m10 = upNew.x;\n const m11 = upNew.y;\n const m12 = upNew.z;\n const m20 = forwardNew.x;\n const m21 = forwardNew.y;\n const m22 = forwardNew.z;\n const num8 = m00 + m11 + m22;\n const quaternion = create();\n if (num8 > 0) {\n let num = Math.sqrt(num8 + 1);\n quaternion.w = num * 0.5;\n num = 0.5 / num;\n quaternion.x = (m12 - m21) * num;\n quaternion.y = (m20 - m02) * num;\n quaternion.z = (m01 - m10) * num;\n return quaternion;\n }\n if (m00 >= m11 && m00 >= m22) {\n const num7 = Math.sqrt(1 + m00 - m11 - m22);\n const num4 = 0.5 / num7;\n quaternion.x = 0.5 * num7;\n quaternion.y = (m01 + m10) * num4;\n quaternion.z = (m02 + m20) * num4;\n quaternion.w = (m12 - m21) * num4;\n return quaternion;\n }\n if (m11 > m22) {\n const num6 = Math.sqrt(1 + m11 - m00 - m22);\n const num3 = 0.5 / num6;\n quaternion.x = (m10 + m01) * num3;\n quaternion.y = 0.5 * num6;\n quaternion.z = (m21 + m12) * num3;\n quaternion.w = (m20 - m02) * num3;\n return quaternion;\n }\n const num5 = Math.sqrt(1 + m22 - m00 - m11);\n const num2 = 0.5 / num5;\n quaternion.x = (m20 + m02) * num2;\n quaternion.y = (m21 + m12) * num2;\n quaternion.z = 0.5 * num5;\n quaternion.w = (m01 - m10) * num2;\n return quaternion;\n }\n Quaternion.lookRotation = lookRotation;\n /**\n * Normalize in place the current quaternion\n * @returns the current updated quaternion\n */\n function normalize(q) {\n const qLength = 1.0 / length(q);\n return create(q.x * qLength, q.y * qLength, q.z * qLength, q.w * qLength);\n }\n Quaternion.normalize = normalize;\n /**\n * Creates a rotation which rotates from fromDirection to toDirection.\n * @param from - defines the first direction Vector\n * @param to - defines the target direction Vector\n */\n function fromToRotation(from, to, up = Vector3.Up()) {\n // Unity-based calculations implemented from https://forum.unity.com/threads/quaternion-lookrotation-around-an-axis.608470/#post-4069888\n const v0 = Vector3.normalize(from);\n const v1 = Vector3.normalize(to);\n const a = Vector3.cross(v0, v1);\n const w = Math.sqrt(Vector3.lengthSquared(v0) * Vector3.lengthSquared(v1)) +\n Vector3.dot(v0, v1);\n if (Vector3.lengthSquared(a) < 0.0001) {\n // the vectors are parallel, check w to find direction\n // if w is 0 then values are opposite, and we sould rotate 180 degrees around the supplied axis\n // otherwise the vectors in the same direction and no rotation should occur\n return Math.abs(w) < 0.0001\n ? normalize(create(up.x, up.y, up.z, 0))\n : Identity();\n }\n else {\n return normalize(create(a.x, a.y, a.z, w));\n }\n }\n Quaternion.fromToRotation = fromToRotation;\n /**\n * Creates an identity quaternion\n * @returns - the identity quaternion\n */\n function Identity() {\n return create(0.0, 0.0, 0.0, 1.0);\n }\n Quaternion.Identity = Identity;\n /**\n * Gets or sets the euler angle representation of the rotation.\n * Implemented unity-based calculations from: https://stackoverflow.com/a/56055813\n * @public\n * @returns a new Vector3 with euler angles degrees\n */\n function toEulerAngles(q) {\n const out = Vector3.create();\n // if the input quaternion is normalized, this is exactly one. Otherwise, this acts as a correction factor for the quaternion's not-normalizedness\n const unit = q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w;\n // q will have a magnitude of 0.5 or greater if and only if q is a singularity case\n const test = q.x * q.w - q.y * q.z;\n if (test > 0.4995 * unit) {\n // singularity at north pole\n out.x = Math.PI / 2;\n out.y = 2 * Math.atan2(q.y, q.x);\n out.z = 0;\n }\n else if (test < -0.4995 * unit) {\n // singularity at south pole\n out.x = -Math.PI / 2;\n out.y = -2 * Math.atan2(q.y, q.x);\n out.z = 0;\n }\n else {\n // no singularity - q is the majority of cases\n out.x = Math.asin(2 * (q.w * q.x - q.y * q.z));\n out.y = Math.atan2(2 * q.w * q.y + 2 * q.z * q.x, 1 - 2 * (q.x * q.x + q.y * q.y));\n out.z = Math.atan2(2 * q.w * q.z + 2 * q.x * q.y, 1 - 2 * (q.z * q.z + q.x * q.x));\n }\n out.x *= RAD2DEG;\n out.y *= RAD2DEG;\n out.z *= RAD2DEG;\n // ensure the degree values are between 0 and 360\n out.x = Scalar.repeat(out.x, 360);\n out.y = Scalar.repeat(out.y, 360);\n out.z = Scalar.repeat(out.z, 360);\n return out;\n }\n Quaternion.toEulerAngles = toEulerAngles;\n /**\n * Creates a new rotation from the given Euler float angles (y, x, z) and stores it in the target quaternion\n * @param yaw - defines the rotation around Y axis (radians)\n * @param pitch - defines the rotation around X axis (radians)\n * @param roll - defines the rotation around Z axis (radians)\n * @param result - defines the target quaternion\n */\n function fromRotationYawPitchRollToRef(yaw, pitch, roll, result) {\n // Implemented unity-based calculations from: https://stackoverflow.com/a/56055813\n const halfPitch = pitch * 0.5;\n const halfYaw = yaw * 0.5;\n const halfRoll = roll * 0.5;\n const c1 = Math.cos(halfPitch);\n const c2 = Math.cos(halfYaw);\n const c3 = Math.cos(halfRoll);\n const s1 = Math.sin(halfPitch);\n const s2 = Math.sin(halfYaw);\n const s3 = Math.sin(halfRoll);\n result.x = c2 * s1 * c3 + s2 * c1 * s3;\n result.y = s2 * c1 * c3 - c2 * s1 * s3;\n result.z = c2 * c1 * s3 - s2 * s1 * c3;\n result.w = c2 * c1 * c3 + s2 * s1 * s3;\n }\n Quaternion.fromRotationYawPitchRollToRef = fromRotationYawPitchRollToRef;\n /**\n * Updates the given quaternion with the given rotation matrix values\n * @param matrix - defines the source matrix\n * @param result - defines the target quaternion\n */\n function fromRotationMatrixToRef(matrix, result) {\n const data = matrix._m;\n // tslint:disable:one-variable-per-declaration\n const m11 = data[0], m12 = data[4], m13 = data[8];\n const m21 = data[1], m22 = data[5], m23 = data[9];\n const m31 = data[2], m32 = data[6], m33 = data[10];\n // tslint:enable:one-variable-per-declaration\n const trace = m11 + m22 + m33;\n let s;\n if (trace > 0) {\n s = 0.5 / Math.sqrt(trace + 1.0);\n result.w = 0.25 / s;\n result.x = (m32 - m23) * s;\n result.y = (m13 - m31) * s;\n result.z = (m21 - m12) * s;\n }\n else if (m11 > m22 && m11 > m33) {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n result.w = (m32 - m23) / s;\n result.x = 0.25 * s;\n result.y = (m12 + m21) / s;\n result.z = (m13 + m31) / s;\n }\n else if (m22 > m33) {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n result.w = (m13 - m31) / s;\n result.x = (m12 + m21) / s;\n result.y = 0.25 * s;\n result.z = (m23 + m32) / s;\n }\n else {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n result.w = (m21 - m12) / s;\n result.x = (m13 + m31) / s;\n result.y = (m23 + m32) / s;\n result.z = 0.25 * s;\n }\n }\n Quaternion.fromRotationMatrixToRef = fromRotationMatrixToRef;\n /**\n * Interpolates between two quaternions\n * @param left - defines first quaternion\n * @param right - defines second quaternion\n * @param amount - defines the gradient to use\n * @returns the new interpolated quaternion\n */\n function slerp(left, right, amount) {\n const result = Quaternion.Identity();\n Quaternion.slerpToRef(left, right, amount, result);\n return result;\n }\n Quaternion.slerp = slerp;\n /**\n * Interpolates between two quaternions and stores it into a target quaternion\n * @param left - defines first quaternion\n * @param right - defines second quaternion\n * @param amount - defines the gradient to use\n * @param result - defines the target quaternion\n */\n function slerpToRef(left, right, amount, result) {\n let num2;\n let num3;\n let num4 = left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w;\n let flag = false;\n if (num4 < 0) {\n flag = true;\n num4 = -num4;\n }\n if (num4 > 0.999999) {\n num3 = 1 - amount;\n num2 = flag ? -amount : amount;\n }\n else {\n const num5 = Math.acos(num4);\n const num6 = 1.0 / Math.sin(num5);\n num3 = Math.sin((1.0 - amount) * num5) * num6;\n num2 = flag\n ? -Math.sin(amount * num5) * num6\n : Math.sin(amount * num5) * num6;\n }\n result.x = num3 * left.x + num2 * right.x;\n result.y = num3 * left.y + num2 * right.y;\n result.z = num3 * left.z + num2 * right.z;\n result.w = num3 * left.w + num2 * right.w;\n }\n Quaternion.slerpToRef = slerpToRef;\n /**\n * Multiplies two quaternions\n * @param self - defines the first operand\n * @param q1 - defines the second operand\n * @returns a new quaternion set as the multiplication result of the self one with the given one \"q1\"\n */\n function multiply(self, q1) {\n const result = create(0, 0, 0, 1.0);\n multiplyToRef(self, q1, result);\n return result;\n }\n Quaternion.multiply = multiply;\n /**\n * Sets the given \"result\" as the the multiplication result of the self one with the given one \"q1\"\n * @param self - defines the first operand\n * @param q1 - defines the second operand\n * @param result - defines the target quaternion\n * @returns the current quaternion\n */\n function multiplyToRef(self, q1, result) {\n result.x = self.x * q1.w + self.y * q1.z - self.z * q1.y + self.w * q1.x;\n result.y = -self.x * q1.z + self.y * q1.w + self.z * q1.x + self.w * q1.y;\n result.z = self.x * q1.y - self.y * q1.x + self.z * q1.w + self.w * q1.z;\n result.w = -self.x * q1.x - self.y * q1.y - self.z * q1.z + self.w * q1.w;\n }\n Quaternion.multiplyToRef = multiplyToRef;\n /**\n *\n * @param degrees - the angle degrees\n * @param axis - vector3\n * @returns a new Quaternion\n */\n function fromAngleAxis(degrees, axis) {\n if (Vector3.lengthSquared(axis) === 0) {\n return Quaternion.Identity();\n }\n const result = Identity();\n let radians = degrees * DEG2RAD;\n radians *= 0.5;\n const a2 = Vector3.normalize(axis);\n Vector3.scaleToRef(a2, Math.sin(radians), a2);\n result.x = a2.x;\n result.y = a2.y;\n result.z = a2.z;\n result.w = Math.cos(radians);\n return normalize(result);\n }\n Quaternion.fromAngleAxis = fromAngleAxis;\n /**\n * Creates a new quaternion containing the rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation)\n * @param axis1 - defines the first axis\n * @param axis2 - defines the second axis\n * @param axis3 - defines the third axis\n * @returns the new quaternion\n */\n function fromAxisToRotationQuaternion(axis1, axis2, axis3) {\n const quat = Quaternion.create(0.0, 0.0, 0.0, 0.0);\n fromAxisToRotationQuaternionToRef(axis1, axis2, axis3, quat);\n return quat;\n }\n Quaternion.fromAxisToRotationQuaternion = fromAxisToRotationQuaternion;\n /**\n * Creates a rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation) and stores it in the target quaternion\n * @param axis1 - defines the first axis\n * @param axis2 - defines the second axis\n * @param axis3 - defines the third axis\n * @param ref - defines the target quaternion\n */\n function fromAxisToRotationQuaternionToRef(axis1, axis2, axis3, ref) {\n const rotMat = Matrix.create();\n Matrix.fromXYZAxesToRef(Vector3.normalize(axis1), Vector3.normalize(axis2), Vector3.normalize(axis3), rotMat);\n Quaternion.fromRotationMatrixToRef(rotMat, ref);\n }\n Quaternion.fromAxisToRotationQuaternionToRef = fromAxisToRotationQuaternionToRef;\n /**\n * Returns a zero filled quaternion\n */\n function Zero() {\n return create(0.0, 0.0, 0.0, 0.0);\n }\n Quaternion.Zero = Zero;\n /**\n * @public\n * Rotates the transform so the forward vector points at target's current position.\n */\n function fromLookAt(position, target, worldUp = Vector3.Up()) {\n const result = Quaternion.Identity();\n fromLookAtToRef(position, target, worldUp, result);\n return result;\n }\n Quaternion.fromLookAt = fromLookAt;\n /**\n * @public\n * Rotates the transform so the forward vector points at target's current position.\n */\n function fromLookAtToRef(position, target, worldUp = Vector3.Up(), result) {\n const m = Matrix.Identity();\n Matrix.lookAtLHToRef(position, target, worldUp, m);\n Matrix.invertToRef(m, m);\n Quaternion.fromRotationMatrixToRef(m, result);\n }\n Quaternion.fromLookAtToRef = fromLookAtToRef;\n})(Quaternion || (Quaternion = {}));\n", "import { Scalar } from './Scalar';\nimport { ToLinearSpace, ToGammaSpace } from './types';\n/**\n * @public\n * Color4 is a type and a namespace.\n * ```\n * // The namespace contains all types and functions to operates with Color4\n * Color4.add(blue, red) // sum component by component resulting pink\n * // The type Color4 is an alias to Color4.ReadonlyColor4\n * const readonlyBlue: Color4 = Color4.Blue()\n * readonlyBlue.a = 0.1 // this FAILS\n *\n * // For mutable usage, use `Color4.Mutable`\n * const blue: Color4.Mutable = Color4.Blue()\n * blue.a = 0.1 // this WORKS\n * ```\n */\nexport var Color4;\n(function (Color4) {\n /**\n * Creates create mutable Color4 from red, green, blue values, all between 0 and 1\n * @param r - defines the red component (between 0 and 1, default is 0)\n * @param g - defines the green component (between 0 and 1, default is 0)\n * @param b - defines the blue component (between 0 and 1, default is 0)\n * @param a - defines the alpha component (between 0 and 1, default is 1)\n */\n function create(\n /**\n * Defines the red component (between 0 and 1, default is 0)\n */\n r = 0, \n /**\n * Defines the green component (between 0 and 1, default is 0)\n */\n g = 0, \n /**\n * Defines the blue component (between 0 and 1, default is 0)\n */\n b = 0, \n /**\n * Defines the alpha component (between 0 and 1, default is 1)\n */\n a = 1) {\n return { r, g, b, a };\n }\n Color4.create = create;\n // Statics\n /**\n * Creates a Color4 from the string containing valid hexadecimal values\n * @param hex - defines a string containing valid hexadecimal values\n * @returns create mutable Color4\n */\n function fromHexString(hex) {\n if (hex.substring(0, 1) !== '#' || (hex.length !== 7 && hex.length !== 9)) {\n return create(0.0, 0.0, 0.0, 1.0);\n }\n const r = parseInt(hex.substring(1, 3), 16);\n const g = parseInt(hex.substring(3, 5), 16);\n const b = parseInt(hex.substring(5, 7), 16);\n const aStr = hex.substring(7, 9);\n const a = aStr ? parseInt(aStr, 16) : 255;\n return Color4.fromInts(r, g, b, a);\n }\n Color4.fromHexString = fromHexString;\n /**\n * Creates create mutable Color4 set with the linearly interpolated values of \"amount\" between the left Color4 object and the right Color4 object\n * @param left - defines the start value\n * @param right - defines the end value\n * @param amount - defines the gradient factor\n * @returns create mutable Color4\n */\n function lerp(left, right, amount) {\n const result = create(0.0, 0.0, 0.0, 0.0);\n Color4.lerpToRef(left, right, amount, result);\n return result;\n }\n Color4.lerp = lerp;\n /**\n * Set the given \"result\" with the linearly interpolated values of \"amount\" between the left Color4 object and the right Color4 object\n * @param left - defines the start value\n * @param right - defines the end value\n * @param amount - defines the gradient factor\n * @param result - defines the Color4 object where to store data\n */\n function lerpToRef(left, right, amount, result) {\n result.r = left.r + (right.r - left.r) * amount;\n result.g = left.g + (right.g - left.g) * amount;\n result.b = left.b + (right.b - left.b) * amount;\n result.a = left.a + (right.a - left.a) * amount;\n }\n Color4.lerpToRef = lerpToRef;\n /**\n * Returns a Color4 value containing a red color\n * @returns a new Color4\n */\n function Red() {\n return create(1.0, 0, 0, 1.0);\n }\n Color4.Red = Red;\n /**\n * Returns a Color4 value containing a green color\n * @returns create mutable Color4\n */\n function Green() {\n return create(0, 1.0, 0, 1.0);\n }\n Color4.Green = Green;\n /**\n * Returns a Color4 value containing a blue color\n * @returns create mutable Color4\n */\n function Blue() {\n return create(0, 0, 1.0, 1.0);\n }\n Color4.Blue = Blue;\n /**\n * Returns a Color4 value containing a black color\n * @returns create mutable Color4\n */\n function Black() {\n return create(0, 0, 0, 1);\n }\n Color4.Black = Black;\n /**\n * Returns a Color4 value containing a white color\n * @returns create mutable Color4\n */\n function White() {\n return create(1, 1, 1, 1);\n }\n Color4.White = White;\n /**\n * Returns a Color4 value containing a purple color\n * @returns create mutable Color4\n */\n function Purple() {\n return create(0.5, 0, 0.5, 1);\n }\n Color4.Purple = Purple;\n /**\n * Returns a Color4 value containing a magenta color\n * @returns create mutable Color4\n */\n function Magenta() {\n return create(1, 0, 1, 1);\n }\n Color4.Magenta = Magenta;\n /**\n * Returns a Color4 value containing a yellow color\n * @returns create mutable Color4\n */\n function Yellow() {\n return create(1, 1, 0, 1);\n }\n Color4.Yellow = Yellow;\n /**\n * Returns a Color4 value containing a gray color\n * @returns create mutable Color4\n */\n function Gray() {\n return create(0.5, 0.5, 0.5, 1.0);\n }\n Color4.Gray = Gray;\n /**\n * Returns a Color4 value containing a teal color\n * @returns create mutable Color4\n */\n function Teal() {\n return create(0, 1.0, 1.0, 1.0);\n }\n Color4.Teal = Teal;\n /**\n * Returns a Color4 value containing a transparent color\n * @returns create mutable Color4\n */\n function Clear() {\n return create(0, 0, 0, 0);\n }\n Color4.Clear = Clear;\n /**\n * Creates a Color4 from a Color3 and an alpha value\n * @param color3 - defines the source Color3 to read from\n * @param alpha - defines the alpha component (1.0 by default)\n * @returns create mutable Color4\n */\n function fromColor3(color3, alpha = 1.0) {\n return create(color3.r, color3.g, color3.b, alpha);\n }\n Color4.fromColor3 = fromColor3;\n /**\n * Creates a Color4 from the starting index element of the given array\n * @param array - defines the source array to read from\n * @param offset - defines the offset in the source array\n * @returns create mutable Color4\n */\n function fromArray(array, offset = 0) {\n return create(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);\n }\n Color4.fromArray = fromArray;\n /**\n * Creates a new Color3 from integer values (less than 256)\n * @param r - defines the red component to read from (value between 0 and 255)\n * @param g - defines the green component to read from (value between 0 and 255)\n * @param b - defines the blue component to read from (value between 0 and 255)\n * @param a - defines the alpha component to read from (value between 0 and 255)\n * @returns a new Color4\n */\n function fromInts(r, g, b, a) {\n return create(r / 255.0, g / 255.0, b / 255.0, a / 255.0);\n }\n Color4.fromInts = fromInts;\n /**\n * Check the content of a given array and convert it to an array containing RGBA data\n * If the original array was already containing count * 4 values then it is returned directly\n * @param colors - defines the array to check\n * @param count - defines the number of RGBA data to expect\n * @returns an array containing count * 4 values (RGBA)\n */\n function checkColors4(colors, count) {\n // Check if color3 was used\n if (colors.length === count * 3) {\n const colors4 = [];\n for (let index = 0; index < colors.length; index += 3) {\n const newIndex = (index / 3) * 4;\n colors4[newIndex] = colors[index];\n colors4[newIndex + 1] = colors[index + 1];\n colors4[newIndex + 2] = colors[index + 2];\n colors4[newIndex + 3] = 1.0;\n }\n return colors4;\n }\n return colors;\n }\n Color4.checkColors4 = checkColors4;\n // Operators\n /**\n * Adds the given Color4 values to the ref Color4 object\n * @param a - defines the first operand\n * @param b - defines the second operand\n * @param ref - defines the result rference\n * @returns\n */\n function addToRef(a, b, ref) {\n ref.r = a.r + b.r;\n ref.g = a.g + b.g;\n ref.b = a.b + b.b;\n ref.a = a.a + b.a;\n }\n Color4.addToRef = addToRef;\n /**\n * Stores from the starting index in the given array the Color4 successive values\n * @param array - defines the array where to store the r,g,b components\n * @param index - defines an optional index in the target array to define where to start storing values\n * @returns the current Color4 object\n */\n function toArray(value, array, index = 0) {\n array[index] = value.r;\n array[index + 1] = value.g;\n array[index + 2] = value.b;\n array[index + 3] = value.a;\n }\n Color4.toArray = toArray;\n /**\n * Creates a Color4 set with the added values of the current Color4 and of the given one\n * @param right - defines the second operand\n * @returns create mutable Color4\n */\n function add(value, right) {\n const ret = Clear();\n addToRef(value, right, ret);\n return ret;\n }\n Color4.add = add;\n /**\n * Creates a Color4 set with the subtracted values of the given one from the current Color4\n * @param right - defines the second operand\n * @returns create mutable Color4\n */\n function subtract(value, right) {\n const ret = Clear();\n subtractToRef(value, right, ret);\n return ret;\n }\n Color4.subtract = subtract;\n /**\n * Subtracts the given ones from the current Color4 values and stores the results in \"result\"\n * @param right - defines the second operand\n * @param result - defines the Color4 object where to store the result\n * @returns the current Color4 object\n */\n function subtractToRef(a, b, result) {\n result.r = a.r - b.r;\n result.g = a.g - b.g;\n result.b = a.b - b.b;\n result.a = a.a - b.a;\n }\n Color4.subtractToRef = subtractToRef;\n /**\n * Creates a Color4 with the current Color4 values multiplied by scale\n * @param scale - defines the scaling factor to apply\n * @returns create mutable Color4\n */\n function scale(value, scale) {\n return create(value.r * scale, value.g * scale, value.b * scale, value.a * scale);\n }\n Color4.scale = scale;\n /**\n * Multiplies the current Color4 values by scale and stores the result in \"result\"\n * @param scale - defines the scaling factor to apply\n * @param result - defines the Color4 object where to store the result\n */\n function scaleToRef(value, scale, result) {\n result.r = value.r * scale;\n result.g = value.g * scale;\n result.b = value.b * scale;\n result.a = value.a * scale;\n }\n Color4.scaleToRef = scaleToRef;\n /**\n * Scale the current Color4 values by a factor and add the result to a given Color4\n * @param scale - defines the scale factor\n * @param result - defines the Color4 object where to store the result\n */\n function scaleAndAddToRef(value, scale, result) {\n result.r += value.r * scale;\n result.g += value.g * scale;\n result.b += value.b * scale;\n result.a += value.a * scale;\n }\n Color4.scaleAndAddToRef = scaleAndAddToRef;\n /**\n * Clamps the rgb values by the min and max values and stores the result into \"result\"\n * @param min - defines minimum clamping value (default is 0)\n * @param max - defines maximum clamping value (default is 1)\n * @param result - defines color to store the result into.\n */\n function clampToRef(value, min = 0, max = 1, result) {\n result.r = Scalar.clamp(value.r, min, max);\n result.g = Scalar.clamp(value.g, min, max);\n result.b = Scalar.clamp(value.b, min, max);\n result.a = Scalar.clamp(value.a, min, max);\n }\n Color4.clampToRef = clampToRef;\n /**\n * Multipy an Color4 value by another and return create mutable Color4\n * @param color - defines the Color4 value to multiply by\n * @returns create mutable Color4\n */\n function multiply(value, color) {\n return create(value.r * color.r, value.g * color.g, value.b * color.b, value.a * color.a);\n }\n Color4.multiply = multiply;\n /**\n * Multipy a Color4 value by another and push the result in a reference value\n * @param color - defines the Color4 value to multiply by\n * @param result - defines the Color4 to fill the result in\n * @returns the result Color4\n */\n function multiplyToRef(value, color, result) {\n result.r = value.r * color.r;\n result.g = value.g * color.g;\n result.b = value.b * color.b;\n result.a = value.a * color.a;\n }\n Color4.multiplyToRef = multiplyToRef;\n /**\n * Creates a string with the Color4 current values\n * @returns the string representation of the Color4 object\n */\n function toString(value) {\n return ('{R: ' +\n value.r +\n ' G:' +\n value.g +\n ' B:' +\n value.b +\n ' A:' +\n value.a +\n '}');\n }\n Color4.toString = toString;\n /**\n * Compute the Color4 hash code\n * @returns an unique number that can be used to hash Color4 objects\n */\n function getHashCode(value) {\n let hash = value.r || 0;\n hash = (hash * 397) ^ (value.g || 0);\n hash = (hash * 397) ^ (value.b || 0);\n hash = (hash * 397) ^ (value.a || 0);\n return hash;\n }\n Color4.getHashCode = getHashCode;\n /**\n * Creates a Color4 copied from the current one\n * @returns create mutable Color4\n */\n function clone(value) {\n return create(value.r, value.g, value.b, value.a);\n }\n Color4.clone = clone;\n /**\n * Copies the given Color4 values into the destination\n * @param source - defines the source Color4 object\n * @param dest - defines the destination Color4 object\n * @returns\n */\n function copyFrom(source, dest) {\n dest.r = source.r;\n dest.g = source.g;\n dest.b = source.b;\n dest.a = source.a;\n }\n Color4.copyFrom = copyFrom;\n /**\n * Copies the given float values into the current one\n * @param r - defines the red component to read from\n * @param g - defines the green component to read from\n * @param b - defines the blue component to read from\n * @param a - defines the alpha component to read from\n * @returns the current updated Color4 object\n */\n function copyFromFloats(r, g, b, a, dest) {\n dest.r = r;\n dest.g = g;\n dest.b = b;\n dest.a = a;\n }\n Color4.copyFromFloats = copyFromFloats;\n /**\n * Copies the given float values into the current one\n * @param r - defines the red component to read from\n * @param g - defines the green component to read from\n * @param b - defines the blue component to read from\n * @param a - defines the alpha component to read from\n * @returns the current updated Color4 object\n */\n function set(r, g, b, a, dest) {\n dest.r = r;\n dest.g = g;\n dest.b = b;\n dest.a = a;\n }\n Color4.set = set;\n /**\n * Compute the Color4 hexadecimal code as a string\n * @returns a string containing the hexadecimal representation of the Color4 object\n */\n function toHexString(value) {\n const intR = (value.r * 255) | 0;\n const intG = (value.g * 255) | 0;\n const intB = (value.b * 255) | 0;\n const intA = (value.a * 255) | 0;\n return ('#' +\n Scalar.toHex(intR) +\n Scalar.toHex(intG) +\n Scalar.toHex(intB) +\n Scalar.toHex(intA));\n }\n Color4.toHexString = toHexString;\n /**\n * Computes a Color4 converted from the current one to linear space\n * @returns create mutable Color4\n */\n function toLinearSpace(value) {\n const convertedColor = create();\n toLinearSpaceToRef(value, convertedColor);\n return convertedColor;\n }\n Color4.toLinearSpace = toLinearSpace;\n /**\n * Converts the Color4 values to linear space and stores the result in \"convertedColor\"\n * @param convertedColor - defines the Color4 object where to store the linear space version\n * @returns the unmodified Color4\n */\n function toLinearSpaceToRef(value, ref) {\n ref.r = Math.pow(value.r, ToLinearSpace);\n ref.g = Math.pow(value.g, ToLinearSpace);\n ref.b = Math.pow(value.b, ToLinearSpace);\n ref.a = value.a;\n }\n Color4.toLinearSpaceToRef = toLinearSpaceToRef;\n /**\n * Computes a Color4 converted from the current one to gamma space\n * @returns create mutable Color4\n */\n function toGammaSpace(value) {\n const convertedColor = create();\n toGammaSpaceToRef(value, convertedColor);\n return convertedColor;\n }\n Color4.toGammaSpace = toGammaSpace;\n /**\n * Converts the Color4 values to gamma space and stores the result in \"convertedColor\"\n * @param convertedColor - defines the Color4 object where to store the gamma space version\n * @returns the unmodified Color4\n */\n function toGammaSpaceToRef(value, convertedColor) {\n convertedColor.r = Math.pow(value.r, ToGammaSpace);\n convertedColor.g = Math.pow(value.g, ToGammaSpace);\n convertedColor.b = Math.pow(value.b, ToGammaSpace);\n convertedColor.a = value.a;\n }\n Color4.toGammaSpaceToRef = toGammaSpaceToRef;\n})(Color4 || (Color4 = {}));\n", "import { ToLinearSpace, ToGammaSpace } from './types';\nimport { Color4 } from './Color4';\nimport { Scalar } from './Scalar';\n/**\n * @public\n * Color3 is a type and a namespace.\n * ```\n * // The namespace contains all types and functions to operates with Color3\n * Color3.add(blue, red) // sum component by component resulting pink\n * // The type Color3 is an alias to Color3.ReadonlyColor3\n * const readonlyBlue: Color3 = Color3.Blue()\n * readonlyBlue.r = 0.1 // this FAILS\n *\n * // For mutable usage, use `Color3.Mutable`\n * const blue: Color3.Mutable = Color3.Blue()\n * blue.r = 0.1 // this WORKS\n * ```\n */\nexport var Color3;\n(function (Color3) {\n /**\n * Creates Color3 object from red, green, blue values, all between 0 and 1\n * @param r - defines the red component (between 0 and 1, default is 0)\n * @param g - defines the green component (between 0 and 1, default is 0)\n * @param b - defines the blue component (between 0 and 1, default is 0)\n */\n function create(\n /**\n * Defines the red component (between 0 and 1, default is 0)\n */\n r = 0, \n /**\n * Defines the green component (between 0 and 1, default is 0)\n */\n g = 0, \n /**\n * Defines the blue component (between 0 and 1, default is 0)\n */\n b = 0) {\n return { r, g, b };\n }\n Color3.create = create;\n /**\n * Creates a Vector3 from the string containing valid hexadecimal values\n * @param hex - defines a string containing valid hexadecimal values\n * @returns a new Vector3\n */\n function fromHexString(hex) {\n if (hex.substring(0, 1) !== '#' || hex.length !== 7) {\n return create(0, 0, 0);\n }\n const r = parseInt(hex.substring(1, 3), 16);\n const g = parseInt(hex.substring(3, 5), 16);\n const b = parseInt(hex.substring(5, 7), 16);\n return fromInts(r, g, b);\n }\n Color3.fromHexString = fromHexString;\n /**\n * Creates a new Vector3 from the starting index of the given array\n * @param array - defines the source array\n * @param offset - defines an offset in the source array\n * @returns a new Vector3\n */\n function fromArray(array, offset = 0) {\n return create(array[offset], array[offset + 1], array[offset + 2]);\n }\n Color3.fromArray = fromArray;\n /**\n * Creates a Vector3 from integer values (less than 256)\n * @param r - defines the red component to read from (value between 0 and 255)\n * @param g - defines the green component to read from (value between 0 and 255)\n * @param b - defines the blue component to read from (value between 0 and 255)\n * @returns a new Vector3\n */\n function fromInts(r, g, b) {\n return create(r / 255.0, g / 255.0, b / 255.0);\n }\n Color3.fromInts = fromInts;\n /**\n * Creates a Vector3 with values linearly interpolated of \"amount\" between the start Color3 and the end Color3\n * @param start - defines the start Color3 value\n * @param end - defines the end Color3 value\n * @param amount - defines the gradient value between start and end\n * @returns a new Vector3\n */\n function lerp(start, end, amount) {\n const result = create(0.0, 0.0, 0.0);\n Color3.lerpToRef(start, end, amount, result);\n return result;\n }\n Color3.lerp = lerp;\n /**\n * Creates a Vector3 with values linearly interpolated of \"amount\" between the start Color3 and the end Color3\n * @param left - defines the start value\n * @param right - defines the end value\n * @param amount - defines the gradient factor\n * @param result - defines the Color3 object where to store the result\n */\n function lerpToRef(left, right, amount, result) {\n result.r = left.r + (right.r - left.r) * amount;\n result.g = left.g + (right.g - left.g) * amount;\n result.b = left.b + (right.b - left.b) * amount;\n }\n Color3.lerpToRef = lerpToRef;\n /**\n * Returns a Color3 value containing a red color\n * @returns a new Vector3\n */\n function Red() {\n return create(1, 0, 0);\n }\n Color3.Red = Red;\n /**\n * Returns a Color3 value containing a green color\n * @returns a new Vector3\n */\n function Green() {\n return create(0, 1, 0);\n }\n Color3.Green = Green;\n /**\n * Returns a Color3 value containing a blue color\n * @returns a new Vector3\n */\n function Blue() {\n return create(0, 0, 1);\n }\n Color3.Blue = Blue;\n /**\n * Returns a Color3 value containing a black color\n * @returns a new Vector3\n */\n function Black() {\n return create(0, 0, 0);\n }\n Color3.Black = Black;\n /**\n * Returns a Color3 value containing a white color\n * @returns a new Vector3\n */\n function White() {\n return create(1, 1, 1);\n }\n Color3.White = White;\n /**\n * Returns a Color3 value containing a purple color\n * @returns a new Vector3\n */\n function Purple() {\n return create(0.5, 0, 0.5);\n }\n Color3.Purple = Purple;\n /**\n * Returns a Color3 value containing a magenta color\n * @returns a new Vector3\n */\n function Magenta() {\n return create(1, 0, 1);\n }\n Color3.Magenta = Magenta;\n /**\n * Returns a Color3 value containing a yellow color\n * @returns a new Vector3\n */\n function Yellow() {\n return create(1, 1, 0);\n }\n Color3.Yellow = Yellow;\n /**\n * Returns a Color3 value containing a gray color\n * @returns a new Vector3\n */\n function Gray() {\n return create(0.5, 0.5, 0.5);\n }\n Color3.Gray = Gray;\n /**\n * Returns a Color3 value containing a teal color\n * @returns a new Vector3\n */\n function Teal() {\n return create(0, 1.0, 1.0);\n }\n Color3.Teal = Teal;\n /**\n * Returns a Color3 value containing a random color\n * @returns a new Vector3\n */\n function Random() {\n return create(Math.random(), Math.random(), Math.random());\n }\n Color3.Random = Random;\n /**\n * Creates a string with the Color3 current values\n * @returns the string representation of the Color3 object\n */\n function toString(value) {\n return '{R: ' + value.r + ' G:' + value.g + ' B:' + value.b + '}';\n }\n Color3.toString = toString;\n /**\n * Compute the Color3 hash code\n * @returns an unique number that can be used to hash Color3 objects\n */\n function getHashCode(value) {\n let hash = value.r || 0;\n hash = (hash * 397) ^ (value.g || 0);\n hash = (hash * 397) ^ (value.b || 0);\n return hash;\n }\n Color3.getHashCode = getHashCode;\n // Operators\n /**\n * Stores in the given array from the given starting index the red, green, blue values as successive elements\n * @param array - defines the array where to store the r,g,b components\n * @param index - defines an optional index in the target array to define where to start storing values\n *\n */\n function toArray(value, array, index = 0) {\n array[index] = value.r;\n array[index + 1] = value.g;\n array[index + 2] = value.b;\n }\n Color3.toArray = toArray;\n /**\n * Returns a new Color4 object from the current Color3 and the given alpha\n * @param alpha - defines the alpha component on the new Color4 object (default is 1)\n * @returns a new Color4 object\n */\n function toColor4(value, alpha = 1) {\n return Color4.create(value.r, value.g, value.b, alpha);\n }\n Color3.toColor4 = toColor4;\n /**\n * Returns a new array populated with 3 numeric elements : red, green and blue values\n * @returns the new array\n */\n function asArray(value) {\n const result = new Array();\n toArray(value, result, 0);\n return result;\n }\n Color3.asArray = asArray;\n /**\n * Returns the luminance value\n * @returns a float value\n */\n function toLuminance(value) {\n return value.r * 0.3 + value.g * 0.59 + value.b * 0.11;\n }\n Color3.toLuminance = toLuminance;\n /**\n * Multiply each Color3 rgb values by the given Color3 rgb values in Color3 object\n * @param otherColor - defines the second operand\n * @returns the create object\n */\n function multiply(value, otherColor) {\n return create(value.r * otherColor.r, value.g * otherColor.g, value.b * otherColor.b);\n }\n Color3.multiply = multiply;\n /**\n * Multiply the rgb values of the Color3 and the given Color3 and stores the result in the object \"result\"\n * @param otherColor - defines the second operand\n * @param result - defines the Color3 object where to store the result\n * @returns the current Color3\n */\n function multiplyToRef(value, otherColor, result) {\n result.r = value.r * otherColor.r;\n result.g = value.g * otherColor.g;\n result.b = value.b * otherColor.b;\n }\n Color3.multiplyToRef = multiplyToRef;\n /**\n * Determines equality between Color3 objects\n * @param otherColor - defines the second operand\n * @returns true if the rgb values are equal to the given ones\n */\n function equals(value, otherColor) {\n return (otherColor &&\n value.r === otherColor.r &&\n value.g === otherColor.g &&\n value.b === otherColor.b);\n }\n Color3.equals = equals;\n /**\n * Determines equality between the current Color3 object and a set of r,b,g values\n * @param r - defines the red component to check\n * @param g - defines the green component to check\n * @param b - defines the blue component to check\n * @returns true if the rgb values are equal to the given ones\n */\n function equalsFloats(value, r, g, b) {\n return value.r === r && value.g === g && value.b === b;\n }\n Color3.equalsFloats = equalsFloats;\n /**\n * Multiplies in place each rgb value by scale\n * @param scale - defines the scaling factor\n * @returns the updated Color3\n */\n function scale(value, scale) {\n return create(value.r * scale, value.g * scale, value.b * scale);\n }\n Color3.scale = scale;\n /**\n * Multiplies the rgb values by scale and stores the result into \"result\"\n * @param scale - defines the scaling factor\n * @param result - defines the Color3 object where to store the result\n * @returns the unmodified current Color3\n */\n function scaleToRef(value, scale, result) {\n result.r = value.r * scale;\n result.g = value.g * scale;\n result.b = value.b * scale;\n }\n Color3.scaleToRef = scaleToRef;\n /**\n * Scale the current Color3 values by a factor and add the result to a given Color3\n * @param scale - defines the scale factor\n * @param result - defines color to store the result into\n * @returns the unmodified current Color3\n */\n function scaleAndAddToRef(value, scale, result) {\n result.r += value.r * scale;\n result.g += value.g * scale;\n result.b += value.b * scale;\n }\n Color3.scaleAndAddToRef = scaleAndAddToRef;\n /**\n * Clamps the rgb values by the min and max values and stores the result into \"result\"\n * @param min - defines minimum clamping value (default is 0)\n * @param max - defines maximum clamping value (default is 1)\n * @param result - defines color to store the result into\n * @returns the original Color3\n */\n function clampToRef(value, min = 0, max = 1, result) {\n result.r = Scalar.clamp(value.r, min, max);\n result.g = Scalar.clamp(value.g, min, max);\n result.b = Scalar.clamp(value.b, min, max);\n }\n Color3.clampToRef = clampToRef;\n /**\n * Clamps the rgb values by the min and max values and returns the result\n * @param min - defines minimum clamping value (default is 0)\n * @param max - defines maximum clamping value (default is 1)\n * @returns result\n */\n function clamp(value, min = 0, max = 1) {\n const result = Color3.Black();\n clampToRef(value, min, max, result);\n return result;\n }\n Color3.clamp = clamp;\n /**\n * Creates Color3 set with the added values of the current Color3 and of the given one\n * @param otherColor - defines the second operand\n * @returns the create\n */\n function add(value, otherColor) {\n return create(value.r + otherColor.r, value.g + otherColor.g, value.b + otherColor.b);\n }\n Color3.add = add;\n /**\n * Stores the result of the addition of the current Color3 and given one rgb values into \"result\"\n * @param otherColor - defines the second operand\n * @param result - defines Color3 object to store the result into\n * @returns the unmodified current Color3\n */\n function addToRef(value, otherColor, result) {\n result.r = value.r + otherColor.r;\n result.g = value.g + otherColor.g;\n result.b = value.b + otherColor.b;\n }\n Color3.addToRef = addToRef;\n /**\n * Returns Color3 set with the subtracted values of the given one from the current Color3\n * @param otherColor - defines the second operand\n * @returns the create\n */\n function subtract(value, otherColor) {\n return create(value.r - otherColor.r, value.g - otherColor.g, value.b - otherColor.b);\n }\n Color3.subtract = subtract;\n /**\n * Stores the result of the subtraction of given one from the current Color3 rgb values into \"result\"\n * @param otherColor - defines the second operand\n * @param result - defines Color3 object to store the result into\n * @returns the unmodified current Color3\n */\n function subtractToRef(value, otherColor, result) {\n result.r = value.r - otherColor.r;\n result.g = value.g - otherColor.g;\n result.b = value.b - otherColor.b;\n }\n Color3.subtractToRef = subtractToRef;\n /**\n * Copy the current object\n * @returns Color3 copied the current one\n */\n function clone(value) {\n return create(value.r, value.g, value.b);\n }\n Color3.clone = clone;\n /**\n * Copies the rgb values from the source in the current Color3\n * @param source - defines the source Color3 object\n * @returns the updated Color3 object\n */\n function copyFrom(source, dest) {\n dest.r = source.r;\n dest.g = source.g;\n dest.b = source.b;\n }\n Color3.copyFrom = copyFrom;\n /**\n * Updates the Color3 rgb values from the given floats\n * @param dest -\n * @param r - defines the red component to read from\n * @param g - defines the green component to read from\n * @param b - defines the blue component to read from\n * @returns\n */\n function set(dest, r, g, b) {\n dest.r = r;\n dest.g = g;\n dest.b = b;\n }\n Color3.set = set;\n /**\n * Compute the Color3 hexadecimal code as a string\n * @returns a string containing the hexadecimal representation of the Color3 object\n */\n function toHexString(value) {\n const intR = (value.r * 255) | 0;\n const intG = (value.g * 255) | 0;\n const intB = (value.b * 255) | 0;\n return '#' + Scalar.toHex(intR) + Scalar.toHex(intG) + Scalar.toHex(intB);\n }\n Color3.toHexString = toHexString;\n /**\n * Computes Color3 converted from the current one to linear space\n * @returns a new Vector3\n */\n function toLinearSpace(value) {\n const convertedColor = create();\n toLinearSpaceToRef(value, convertedColor);\n return convertedColor;\n }\n Color3.toLinearSpace = toLinearSpace;\n /**\n * Converts the Color3 values to linear space and stores the result in \"convertedColor\"\n * @param convertedColor - defines the Color3 object where to store the linear space version\n * @returns the unmodified Color3\n */\n function toLinearSpaceToRef(value, convertedColor) {\n convertedColor.r = Math.pow(value.r, ToLinearSpace);\n convertedColor.g = Math.pow(value.g, ToLinearSpace);\n convertedColor.b = Math.pow(value.b, ToLinearSpace);\n }\n Color3.toLinearSpaceToRef = toLinearSpaceToRef;\n /**\n * Computes Color3 converted from the current one to gamma space\n * @returns a new Vector3\n */\n function toGammaSpace(value) {\n const convertedColor = create();\n toGammaSpaceToRef(value, convertedColor);\n return convertedColor;\n }\n Color3.toGammaSpace = toGammaSpace;\n /**\n * Converts the Color3 values to gamma space and stores the result in \"convertedColor\"\n * @param convertedColor - defines the Color3 object where to store the gamma space version\n * @returns the unmodified Color3\n */\n function toGammaSpaceToRef(value, convertedColor) {\n convertedColor.r = Math.pow(value.r, ToGammaSpace);\n convertedColor.g = Math.pow(value.g, ToGammaSpace);\n convertedColor.b = Math.pow(value.b, ToGammaSpace);\n }\n Color3.toGammaSpaceToRef = toGammaSpaceToRef;\n})(Color3 || (Color3 = {}));\n", "import { Vector3 } from '@dcl/sdk/math'\nimport { engine, Schemas } from '@dcl/sdk/ecs'\n/**\n * Types\n */\n\nexport enum BeerType {\n\tNONE,\n\tRED,\n\tYELLOW,\n\tGREEN\n}\n\nexport type TapDataType = {\n\tmodel: string\n\tposition: Vector3\n\tname: string\n}\n\nexport const TAP_DATA: Record = {\n\t[BeerType.RED]: {\n\t\tname: 'Red',\n\t\tmodel: 'models/redTap.glb',\n\t\tposition: Vector3.create(0.368, 0, 0.31)\n\t},\n\t[BeerType.YELLOW]: {\n\t\tname: 'Yellow',\n\t\tmodel: 'models/yellowTap.glb',\n\t\tposition: Vector3.create(0, 0, 0.31)\n\t},\n\t[BeerType.GREEN]: {\n\t\tname: 'Green',\n\t\tmodel: 'models/greenTap.glb',\n\t\tposition: Vector3.create(-0.368, 0, 0.31)\n\t}\n}\n\nexport function getTapData(tapBeerType: BeerType) {\n\treturn (TAP_DATA as any)[tapBeerType] as TapDataType\n}\n\n/**\n * Component Definitions\n */\n\nexport const BeerGlass = engine.defineComponent('BeerGlass', {\n\tbeingFilled: Schemas.Boolean,\n\tfilled: Schemas.Boolean,\n\tbeerType: Schemas.EnumNumber(BeerType, BeerType.NONE),\n\tdrinking: Schemas.Boolean\n})\nexport const PickedUp = engine.defineComponent('PickedUp', { avatarId: Schemas.String })\n\nexport const TapComponent = engine.defineComponent('TapComponent', {\n\tpouringTime: Schemas.Number,\n\tpouring: Schemas.Boolean,\n\tbeerType: Schemas.EnumNumber(BeerType, BeerType.NONE)\n})\n\nexport const TapBase = engine.defineComponent('TapBase', {\n\tbeerType: Schemas.EnumNumber(BeerType, BeerType.NONE)\n})\n", "import { IEngine, Transport } from '@dcl/ecs'\nimport { sendBinary } from '~system/CommunicationsController'\n\nimport { syncFilter } from './filter'\nimport { engineToCrdt } from './state'\nimport { serializeCrdtMessages } from '../internal/transports/logger'\nimport { BinaryMessageBus, CommsMessage } from './binary-message-bus'\nimport {\n definePlayersInScene,\n fetchProfile,\n oldestUser as _oldestUser,\n setInitialized,\n stateInitialized,\n stateInitializedChecker,\n syncTransportIsReady\n} from './utils'\nimport { entityUtils } from './entities'\n\nexport type IProfile = { networkId: number; userId: string }\n// user that we asked for the inital crdt state\nexport function addSyncTransport(engine: IEngine) {\n definePlayersInScene(engine)\n // Profile Info\n const myProfile: IProfile = {} as IProfile\n fetchProfile(myProfile!)\n\n // Entity utils\n const entityDefinitions = entityUtils(engine, myProfile)\n\n // List of MessageBuss messsages to be sent on every frame to comms\n const pendingMessageBusMessagesToSend: Uint8Array[] = []\n const binaryMessageBus = BinaryMessageBus((message) => pendingMessageBusMessagesToSend.push(message))\n function getMessagesToSend() {\n const messages = [...pendingMessageBusMessagesToSend]\n pendingMessageBusMessagesToSend.length = 0\n return messages\n }\n\n // Add Sync Transport\n const transport: Transport = {\n filter: syncFilter,\n send: async (message: Uint8Array) => {\n if (syncTransportIsReady(engine) && message.byteLength) {\n console.log(Array.from(serializeCrdtMessages('[send CRDT]: ', message, engine)))\n binaryMessageBus.emit(CommsMessage.CRDT, message)\n }\n const messages = getMessagesToSend()\n const response = await sendBinary({ data: messages })\n binaryMessageBus.__processMessages(response.data)\n },\n type: 'network'\n }\n engine.addTransport(transport)\n // End add sync transport\n\n // Add state intialized checker\n engine.addSystem(() => stateInitializedChecker(engine, myProfile, entityDefinitions.syncEntity))\n\n // Request initial state\n binaryMessageBus.emit(CommsMessage.REQ_CRDT_STATE, new Uint8Array())\n\n // If we dont have any state initialized, and recieve a state message.\n binaryMessageBus.on(CommsMessage.RES_CRDT_STATE, (value) => {\n console.log(Array.from(serializeCrdtMessages('[binaryMessageBus]: ', value, engine)))\n if (!stateInitialized) {\n setInitialized()\n transport.onmessage!(value)\n }\n })\n\n // If we are the oldest user and we recieve a req of a state we send it.\n binaryMessageBus.on(CommsMessage.REQ_CRDT_STATE, () => {\n // TODO: oldest not working because connectedPlayers returns players that are not in the scene.\n // Not working :sadcat:\n // const oldest = oldestUser(engine, myProfile, entityDefinitions.syncEntity)\n if (stateInitialized) {\n binaryMessageBus.emit(CommsMessage.RES_CRDT_STATE, engineToCrdt(engine))\n }\n })\n\n // Process CRDT messages here\n binaryMessageBus.on(CommsMessage.CRDT, (value) => {\n console.log(Array.from(serializeCrdtMessages('[CRDT on]: ', value, engine)))\n\n transport.onmessage!(value)\n })\n\n return {\n ...entityDefinitions,\n myProfile\n }\n}\n", "import {\n TransportMessage,\n PointerEventsResult,\n GltfContainerLoadingState,\n EntityUtils,\n RESERVED_STATIC_ENTITIES,\n CrdtMessageType,\n SyncComponents as _SyncComponents,\n NetworkEntity as _NetworkEntity,\n engine,\n NetworkParent as _NetworkParent\n} from '@dcl/ecs'\n\nexport function syncFilter(message: Omit) {\n const componentId = (message as any).componentId\n\n if ([PointerEventsResult.componentId, GltfContainerLoadingState.componentId].includes(componentId)) {\n return false\n }\n\n const [entityId] = EntityUtils.fromEntityId(message.entityId)\n\n // filter messages from reserved entities.\n if (entityId < RESERVED_STATIC_ENTITIES) {\n return false\n }\n\n const NetworkEntity = engine.getComponent(_NetworkEntity.componentId) as typeof _NetworkEntity\n const network = NetworkEntity.getOrNull(message.entityId)\n // Delete Network Entity Always\n if (\n message.type === CrdtMessageType.DELETE_ENTITY_NETWORK ||\n (network && message.type === CrdtMessageType.DELETE_ENTITY)\n ) {\n return true\n }\n const SyncComponents = engine.getComponent(_SyncComponents.componentId) as typeof _SyncComponents\n const sync = SyncComponents.getOrNull(message.entityId)\n if (!sync) return false\n\n // First component\n if ((message as any).timestamp <= 1) {\n return true\n }\n\n if (componentId === NetworkEntity.componentId) {\n return false\n }\n\n // If there is a change in the network parent or syncComponents we should always sync\n if (componentId === _NetworkParent.componentId || componentId === SyncComponents.componentId) {\n return true\n }\n\n if (componentId && sync.componentIds.includes(componentId)) {\n return true\n }\n\n return false\n}\n", "import { ReadWriteByteBuffer } from '@dcl/ecs/dist/serialization/ByteBuffer'\nimport {\n CrdtMessageHeader,\n CrdtMessageProtocol,\n CrdtMessageType,\n IEngine,\n PutComponentOperation,\n PutNetworkComponentOperation,\n SyncComponents as _SyncComponents,\n NetworkEntity as _NetworkEntity,\n ISyncComponents,\n INetowrkEntity\n} from '@dcl/ecs'\n\nexport function engineToCrdt(engine: IEngine): Uint8Array {\n const crdtBuffer = new ReadWriteByteBuffer()\n const networkBuffer = new ReadWriteByteBuffer()\n const SyncComponents = engine.getComponent(_SyncComponents.componentId) as ISyncComponents\n const NetworkEntity = engine.getComponent(_NetworkEntity.componentId) as INetowrkEntity\n const syncEntities = new Set(Array.from(engine.getEntitiesWith(SyncComponents)).map(($) => $[0]))\n\n for (const itComponentDefinition of engine.componentsIter()) {\n itComponentDefinition.dumpCrdtStateToBuffer(crdtBuffer, (entity) => syncEntities.has(entity))\n }\n\n let header: CrdtMessageHeader | null\n while ((header = CrdtMessageProtocol.getHeader(crdtBuffer))) {\n if (header.type === CrdtMessageType.PUT_COMPONENT) {\n const message = PutComponentOperation.read(crdtBuffer)!\n const networkEntity = NetworkEntity.getOrNull(message.entityId)\n if (networkEntity) {\n PutNetworkComponentOperation.write(\n networkEntity.entityId,\n message.timestamp,\n message.componentId,\n networkEntity.networkId,\n message.data,\n networkBuffer\n )\n } else {\n PutComponentOperation.write(\n message.entityId,\n message.timestamp,\n message.componentId,\n message.data,\n networkBuffer\n )\n }\n } else {\n crdtBuffer.incrementReadOffset(header.length)\n }\n }\n\n return networkBuffer.toBinary()\n}\n", "import { CrdtMessageProtocol } from './crdtMessageProtocol';\nimport { CrdtMessageType } from './types';\nimport { PutComponentOperation } from './putComponent';\nimport { DeleteComponent } from './deleteComponent';\nimport { DeleteEntity } from './deleteEntity';\nimport { AppendValueOperation } from './appendValue';\nimport { PutNetworkComponentOperation } from './network/putComponentNetwork';\nimport { DeleteComponentNetwork } from './network/deleteComponentNetwork';\nimport { DeleteEntityNetwork } from './network/deleteEntityNetwork';\nexport function readMessage(buf) {\n const header = CrdtMessageProtocol.getHeader(buf);\n if (!header)\n return null;\n if (header.type === CrdtMessageType.PUT_COMPONENT) {\n return PutComponentOperation.read(buf);\n }\n else if (header.type === CrdtMessageType.PUT_COMPONENT_NETWORK) {\n return PutNetworkComponentOperation.read(buf);\n }\n else if (header.type === CrdtMessageType.DELETE_COMPONENT) {\n return DeleteComponent.read(buf);\n }\n else if (header.type === CrdtMessageType.DELETE_COMPONENT_NETWORK) {\n return DeleteComponentNetwork.read(buf);\n }\n else if (header.type === CrdtMessageType.APPEND_VALUE) {\n return AppendValueOperation.read(buf);\n }\n else if (header.type === CrdtMessageType.DELETE_ENTITY) {\n return DeleteEntity.read(buf);\n }\n else if (header.type === CrdtMessageType.DELETE_ENTITY_NETWORK) {\n return DeleteEntityNetwork.read(buf);\n }\n return null;\n}\n", "import { IEngine, CrdtMessage, CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from '@dcl/ecs'\nimport { ReadWriteByteBuffer } from '@dcl/ecs/dist/serialization/ByteBuffer'\nimport { readMessage } from '@dcl/ecs/dist/serialization/crdt/message'\n\nexport function* serializeCrdtMessages(prefix: string, data: Uint8Array, engine: IEngine) {\n const buffer = new ReadWriteByteBuffer(data)\n\n let message: CrdtMessage | null\n\n while ((message = readMessage(buffer))) {\n const ent = message.entityId\n const preface = `${prefix}: ${CrdtMessageType[message.type]} e=${ent}`\n if (message.type === CrdtMessageType.DELETE_ENTITY || message.type === CrdtMessageType.DELETE_ENTITY_NETWORK) {\n yield `${preface}`\n }\n\n if (\n message.type === CrdtMessageType.PUT_COMPONENT ||\n message.type === CrdtMessageType.PUT_COMPONENT_NETWORK ||\n message.type === CrdtMessageType.DELETE_COMPONENT_NETWORK ||\n message.type === CrdtMessageType.DELETE_COMPONENT ||\n message.type === CrdtMessageType.APPEND_VALUE\n ) {\n const { componentId, timestamp } = message\n const data = 'data' in message ? message.data : undefined\n\n try {\n const c = engine.getComponent(componentId)\n yield `${preface} c=${c.componentName} t=${timestamp} data=${JSON.stringify(\n (data && c.schema.deserialize(new ReadWriteByteBuffer(data))) || null\n )}`\n } catch {\n yield `${preface} c=${componentId} t=${timestamp} data=?`\n }\n } else if (\n message.type === CrdtMessageType.DELETE_ENTITY ||\n message.type === CrdtMessageType.DELETE_ENTITY_NETWORK\n ) {\n yield preface\n } else {\n yield `${preface} Unknown CrdtMessageType`\n }\n }\n}\n", "import { ReadWriteByteBuffer } from '@dcl/ecs/dist/serialization/ByteBuffer'\n\nexport enum CommsMessage {\n CRDT = 1,\n REQ_CRDT_STATE = 2,\n RES_CRDT_STATE = 3\n}\n\nexport function BinaryMessageBus(send: (message: Uint8Array) => void) {\n const mapping: Map void> = new Map()\n return {\n on: (message: K, callback: (value: Uint8Array, sender: string) => void) => {\n mapping.set(message, callback)\n },\n emit: (message: K, value: Uint8Array) => {\n console.log('[EMIT]: ', message)\n send(craftMessage(message, value))\n },\n __processMessages: (messages: Uint8Array[]) => {\n for (const message of messages) {\n const commsMsg = decodeMessage(message)\n if (!commsMsg) continue\n const { sender, messageType, data } = commsMsg\n console.log('[ON]: ', messageType, { sender })\n const fn = mapping.get(messageType)\n if (fn) fn(data, sender)\n }\n }\n }\n}\n\nexport function craftMessage(messageType: T, payload: Uint8Array): Uint8Array {\n const msg = new Uint8Array(payload.byteLength + 1)\n msg.set([messageType])\n msg.set(payload, 1)\n return msg\n}\n\nexport function decodeMessage(\n data: Uint8Array\n): { sender: string; messageType: T; data: Uint8Array } | undefined {\n try {\n let offset = 0\n const r = new Uint8Array(data)\n const view = new DataView(r.buffer)\n const senderLength = view.getUint8(offset)\n offset += 1\n const sender = decodeString(data.subarray(1, senderLength + 1))\n offset += senderLength\n const messageType = view.getUint8(offset) as T\n offset += 1\n const message = r.subarray(offset)\n\n return {\n sender,\n messageType,\n data: message\n }\n } catch (e) {\n console.error('Invalid Comms message', e)\n }\n}\n\nexport function decodeString(data: Uint8Array): string {\n const buffer = new ReadWriteByteBuffer()\n buffer.writeBuffer(data, true)\n return buffer.readUtf8String()\n}\n\nexport function encodeString(s: string): Uint8Array {\n const buffer = new ReadWriteByteBuffer()\n buffer.writeUtf8String(s)\n return buffer.readBuffer()\n}\n", "import {\n EngineInfo as _EngineInfo,\n Entity,\n IEngine,\n NetworkEntity as _NetworkEntity,\n Schemas,\n LastWriteWinElementSetComponentDefinition,\n PBEngineInfo\n} from '@dcl/ecs'\nimport { componentNumberFromName } from '@dcl/ecs/dist/components/component-number'\n\nimport { getUserData } from '~system/UserIdentity'\nimport { SyncEntity } from './entities'\nimport { IProfile } from './message-bus-sync'\n\n// Component to track all the players and when they enter to the scene.\n// Know who is in charge of sending the initial state (oldest one)\nexport const definePlayersInScene = (engine: IEngine) =>\n engine.defineComponent('players-scene', {\n timestamp: Schemas.Number,\n userId: Schemas.String\n })\n\n// Already initialized my state. Ignore new states messages.\nexport let stateInitialized = false\n\n// My player entity to check if I'm the oldest player in the scend\nexport let playerSceneEntity: Entity\n\nexport function setInitialized() {\n stateInitialized = true\n}\n\n// Flag to avoid sending over the wire all the initial messages that the engine add's to the rendererTransport\n// INITIAL_CRDT_MESSAGES that are being processed on the onStart loop, before the onUpdate.\nexport let INITIAL_CRDT_RENDERER_MESSAGES_SENT = false\n\n// Retrieve userId to start sending this info as the networkId\nexport function fetchProfile(myProfile: IProfile) {\n void getUserData({}).then(({ data }) => {\n if (data?.userId) {\n const userId = data.userId\n const networkId = componentNumberFromName(data.userId)\n myProfile.networkId = networkId\n myProfile.userId = userId\n } else {\n throw new Error(`Couldn't fetch profile data`)\n }\n })\n}\n\n/**\n * Add's the user information about when he joined the scene.\n * It's used to check who is the oldest one, to sync the state\n */\nexport function createPlayerTimestampData(engine: IEngine, profile: IProfile, syncEntity: SyncEntity) {\n if (!profile?.userId) return undefined\n const PlayersInScene = definePlayersInScene(engine)\n const entity = engine.addEntity()\n PlayersInScene.create(entity, { timestamp: Date.now(), userId: profile.userId })\n syncEntity(entity, [PlayersInScene.componentId])\n playerSceneEntity = entity\n return playerSceneEntity\n}\n\n/**\n * Check if I'm the older user to send the initial state\n */\nexport function oldestUser(engine: IEngine, profile: IProfile, syncEntity: SyncEntity): boolean {\n const PlayersInScene = definePlayersInScene(engine)\n // When the user leaves the scene but it's still connected.\n if (!PlayersInScene.has(playerSceneEntity)) {\n createPlayerTimestampData(engine, profile, syncEntity)\n return oldestUser(engine, profile, syncEntity)\n }\n const { timestamp } = PlayersInScene.get(playerSceneEntity)\n for (const [_, player] of engine.getEntitiesWith(PlayersInScene)) {\n if (player.timestamp < timestamp) return false\n }\n return true\n}\n\n/**\n * Ignore CRDT's initial messages from the renderer.\n */\nexport function syncTransportIsReady(engine: IEngine) {\n const EngineInfo = engine.getComponent(\n _EngineInfo.componentId\n ) as LastWriteWinElementSetComponentDefinition\n if (!INITIAL_CRDT_RENDERER_MESSAGES_SENT) {\n const engineInfo = EngineInfo.getOrNull(engine.RootEntity)\n if (engineInfo && engineInfo.tickNumber > 2) {\n INITIAL_CRDT_RENDERER_MESSAGES_SENT = true\n }\n }\n return INITIAL_CRDT_RENDERER_MESSAGES_SENT\n}\n\n/**\n * Check if we are already initialized\n * Add the playerSceneData component and syncronize it till we receive the state.\n * This fn should be added as a system so it runs on every tick\n */\n// TODO: Had to comment all the logic because getConnectedPlayers was not working as expected\n// A lot of raise conditions. For now we will go with the approach that every client that it's initialized will send his crdt state.\nexport function stateInitializedChecker(engine: IEngine, _profile: IProfile, _syncEntity: SyncEntity) {\n // const PlayersInScene = definePlayersInScene(engine)\n const EngineInfo = engine.getComponent(_EngineInfo.componentId) as typeof _EngineInfo\n // const NetworkEntity = engine.getComponent(_NetworkEntity.componentId) as INetowrkEntity\n async function enterScene() {\n // if (!playerSceneEntity) {\n // createPlayerTimestampData(engine, profile, syncEntity)\n // }\n\n /**\n * Keeps PlayersInScene up-to-date with the current players.\n */\n // const connectedPlayers = await getConnectedPlayers({})\n // for (const [entity, player] of engine.getEntitiesWith(PlayersInScene)) {\n // if (!connectedPlayers.players.find(($) => $.userId === player.userId)) {\n // PlayersInScene.deleteFrom(entity)\n // }\n // }\n\n // Wait for comms to be ready ?? ~3000ms\n if ((EngineInfo.getOrNull(engine.RootEntity)?.tickNumber ?? 0) > 100) {\n setInitialized()\n return\n }\n\n // If we already have data from players, dont send the heartbeat messages\n // if (connectedPlayers.players.length) return\n\n // if (!stateInitialized && playerSceneEntity) {\n // // Send this data to all the players connected (new and old)\n // // So everyone can decide if it's the oldest one or no.\n // // It's for the case that multiple users enters ~ at the same time.\n // PlayersInScene.getMutable(playerSceneEntity)\n // }\n }\n void enterScene()\n}\n", "import {\n Entity,\n IEngine,\n NetworkEntity as _NetworkEntity,\n INetowrkEntity,\n NetworkParent as _NetworkParent,\n Transform as _Transform,\n SyncComponents as _SyncComponents,\n INetowrkParent,\n TransformComponent,\n ISyncComponents\n} from '@dcl/ecs'\nimport { IProfile } from './message-bus-sync'\n\nexport type SyncEntity = (entityId: Entity, componentIds: number[], entityEnumId?: number) => void\n\nexport function entityUtils(engine: IEngine, profile: IProfile) {\n const NetworkEntity = engine.getComponent(_NetworkEntity.componentId) as INetowrkEntity\n const NetworkParent = engine.getComponent(_NetworkParent.componentId) as INetowrkParent\n const Transform = engine.getComponent(_Transform.componentId) as TransformComponent\n const SyncComponents = engine.getComponent(_SyncComponents.componentId) as ISyncComponents\n\n /**\n * Create a network entity (sync) through comms, and sync the received components\n */\n function syncEntity(entityId: Entity, componentIds: number[], entityEnumId?: number) {\n // Profile not initialized\n if (!profile?.networkId) {\n throw new Error('Profile not initialized. Called syncEntity inside the main() function.')\n }\n\n // We use the networkId generated by the user address to identify this entity through the network\n const networkValue = { entityId, networkId: profile.networkId }\n\n // If there is an entityEnumId, it means is the same entity for all the clients created on the main funciton.\n // So the networkId should be the same in all the clients to avoid re-creating this entity.\n // For this case we use networkId = 0.\n if (entityEnumId !== undefined) {\n networkValue.networkId = 0\n networkValue.entityId = entityEnumId as Entity\n\n // Check if this enum is already used\n for (const [_, network] of engine.getEntitiesWith(NetworkEntity)) {\n if (network.networkId === networkValue.networkId && network.entityId === networkValue.entityId) {\n throw new Error('syncEntity failed because the id provided is already in use')\n }\n }\n }\n\n // If is not defined, then is a entity created in runtime (what we called dynamic/runtime entities).\n NetworkEntity.createOrReplace(entityId, networkValue)\n SyncComponents.createOrReplace(entityId, { componentIds })\n }\n\n /**\n * Returns an iterable of all the childrens of the given entity.\n * for (const children of getChildren(parent)) { console.log(children) }\n * or just => const childrens: Entity[] = Array.from(getChildren(parent))\n */\n function* getChildren(parent: Entity): Iterable {\n const network = NetworkEntity.getOrNull(parent)\n if (network) {\n for (const [entity, parent] of engine.getEntitiesWith(NetworkParent)) {\n if (parent.entityId === network.entityId && parent.networkId === network.networkId) {\n yield entity\n }\n }\n }\n }\n\n function getFirstChild(entity: Entity) {\n return Array.from(getChildren(entity))[0]\n }\n\n /**\n * Returns the parent entity of the given entity.\n */\n function getParent(child: Entity): Entity | undefined {\n const parent = NetworkParent.getOrNull(child)\n if (!parent) return undefined\n for (const [entity, network] of engine.getEntitiesWith(NetworkEntity)) {\n if (parent.networkId === network.networkId && parent.entityId === network.entityId) {\n return entity\n }\n }\n return undefined\n }\n\n /**\n * Adds the network parenting to sync entities.\n * Equivalent to Transform.parent for local entities\n */\n function parentEntity(entity: Entity, parent: Entity) {\n const network = NetworkEntity.getOrNull(parent)\n if (!network) {\n throw new Error('Entity is not sync. Call syncEntity on the parent.')\n }\n\n // Create network parent component\n NetworkParent.createOrReplace(entity, network)\n\n // If we dont have a transform for this entity, create an empty one to send it to the renderer\n if (!Transform.getOrNull(entity)) {\n Transform.create(entity)\n }\n }\n\n /**\n * Removes the network parenting from an entity\n */\n function removeParent(entity: Entity) {\n const network = NetworkEntity.getOrNull(entity)\n\n if (!network) {\n throw new Error('Entity is not sync')\n }\n\n NetworkParent.deleteFrom(entity)\n }\n\n return {\n syncEntity,\n getChildren,\n getParent,\n parentEntity,\n removeParent,\n getFirstChild\n }\n}\n", "import { engine } from '@dcl/ecs'\nimport { addSyncTransport } from './message-bus-sync'\n\n// initialize sync transport for sdk engine\nconst { getChildren, syncEntity, parentEntity, getParent, myProfile, removeParent, getFirstChild } =\n addSyncTransport(engine)\n\nexport { getFirstChild, getChildren, syncEntity, parentEntity, getParent, myProfile, removeParent }\n", "import {\n\tengine,\n\tGltfContainer,\n\tTransform,\n\tAnimator,\n\tPointerEvents,\n\tPointerEventType,\n\tInputAction,\n\tEntity,\n\tMeshCollider,\n\tMeshRenderer,\n\tAudioSource,\n\tColliderLayer,\n\tAvatarAttach\n} from '@dcl/sdk/ecs'\nimport { Vector3, Quaternion } from '@dcl/sdk/math'\nimport { BeerGlass, BeerType, getTapData, TapBase, TapComponent } from '../definitions'\nimport { parentEntity, syncEntity } from '@dcl/sdk/network'\n\nexport enum SyncEntityIDs {\n\tRED = 1,\n\tGREEN = 2,\n\tYELLOW = 3,\n\tGLASS1 = 4,\n\tGLASS2 = 5,\n\tGLASS3 = 6,\n\tGLASS4 = 7,\n\tGLASS5 = 8,\n\tGLASS6 = 9,\n\tGLASS7 = 10,\n\tGLASS8 = 11,\n\tGLASS9 = 12,\n\tTABLES = 13,\n}\n\n\nexport function createBeerGlass(model: string, position: Vector3, id: SyncEntityIDs) {\n\tconst glassEntity = engine.addEntity()\n\n\tGltfContainer.create(glassEntity, {\n\t\tsrc: model,\n\t\tvisibleMeshesCollisionMask: ColliderLayer.CL_POINTER,\n\t\tinvisibleMeshesCollisionMask: undefined\n\t})\n\n\tTransform.create(glassEntity, { position })\n\n\tAnimator.create(glassEntity, {\n\t\tstates: [\n\t\t\t{\n\t\t\t\tclip: 'Blank',\n\t\t\t\tplaying: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tclip: 'PourRed',\n\t\t\t\tloop: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tclip: 'PourYellow',\n\t\t\t\tloop: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tclip: 'PourGreen',\n\t\t\t\tloop: false\n\t\t\t}\n\t\t]\n\t})\n\tBeerGlass.create(glassEntity)\n\n\tPointerEvents.create(glassEntity, {\n\t\tpointerEvents: [\n\t\t\t{\n\t\t\t\teventType: PointerEventType.PET_DOWN,\n\t\t\t\teventInfo: {\n\t\t\t\t\thoverText: 'Pick up',\n\t\t\t\t\tmaxDistance: 5,\n\t\t\t\t\tbutton: InputAction.IA_PRIMARY\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t})\n\n\tsyncEntity(glassEntity, [Animator.componentId, AudioSource.componentId, Transform.componentId, BeerGlass.componentId], id)\n}\n\nexport function createTap(tapBeerType: BeerType, dispenseEntity: Entity, id: SyncEntityIDs) {\n\tconst tapEntity = engine.addEntity()\n\tconst tapData = getTapData(tapBeerType)\n\n\tTapComponent.create(tapEntity, {\n\t\tbeerType: tapBeerType\n\t})\n\tGltfContainer.create(tapEntity, {\n\t\tsrc: tapData.model\n\t})\n\tTransform.create(tapEntity, {\n\t\tparent: dispenseEntity\n\t})\n\tAnimator.create(tapEntity, {\n\t\tstates: [\n\t\t\t{\n\t\t\t\tclip: 'Blank',\n\t\t\t\tplaying: true,\n\t\t\t\tloop: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tclip: 'Pour',\n\t\t\t\tloop: false\n\t\t\t}\n\t\t]\n\t})\n\n\tPointerEvents.create(tapEntity, {\n\t\tpointerEvents: [\n\t\t\t{\n\t\t\t\teventType: PointerEventType.PET_DOWN,\n\t\t\t\teventInfo: {\n\t\t\t\t\thoverText: 'Pour',\n\t\t\t\t\tmaxDistance: 5,\n\t\t\t\t\tbutton: InputAction.IA_PRIMARY\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t})\n\n\tsyncEntity(tapEntity, [Animator.componentId, AudioSource.componentId], id)\n\n\tconst tapColliderPosition = Vector3.add(tapData.position, Vector3.create(0, 0.05, 0))\n\tconst colliderParentEntity = engine.addEntity()\n\tTransform.create(colliderParentEntity, {\n\t\t//parent: tapEntity,\n\t\tposition: tapColliderPosition\n\t})\n\tTapBase.create(colliderParentEntity, {\n\t\tbeerType: tapBeerType\n\t})\n\tsyncEntity(colliderParentEntity, [], id + 100)\n\tparentEntity(colliderParentEntity, tapEntity)\n\n\tconst colliderEntity = engine.addEntity()\n\tTransform.create(colliderEntity, {\n\t\t//parent: colliderParentEntity,\n\t\tscale: Vector3.scale(Vector3.One(), 0.33),\n\t\trotation: Quaternion.fromEulerDegrees(90, 0, 0)\n\t})\n\n\tsyncEntity(colliderEntity, [], id + 200)\n\tparentEntity(colliderEntity, colliderParentEntity)\n\n\n\tMeshCollider.setPlane(colliderEntity)\n\t// Debug to see the collider\n\t//MeshRenderer.setPlane(colliderEntity)\n\tPointerEvents.create(colliderEntity, {\n\t\tpointerEvents: [\n\t\t\t{\n\t\t\t\teventType: PointerEventType.PET_DOWN,\n\t\t\t\teventInfo: {\n\t\t\t\t\thoverText: 'Place mug',\n\t\t\t\t\tbutton: InputAction.IA_PRIMARY\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t})\n}\n\nexport function playSound(audio: string, loop: boolean = false, entity: Entity) {\n\n\tAudioSource.createOrReplace(entity, {\n\t\taudioClipUrl: audio,\n\t\tloop,\n\t\tplaying: true\n\t})\n\n\treturn entity\n}\n", "import { Transform, engine, executeTask, Entity, Animator } from '@dcl/sdk/ecs'\nimport { Vector3 } from '@dcl/sdk/math'\nimport { getUserData } from '~system/UserIdentity'\n\nexport function getPlayerPosition() {\n\treturn Transform.getOrNull(engine.PlayerEntity)?.position || Vector3.create()\n}\n\nexport let currentPlayerId: string\n\nvoid executeTask(async () => {\n\tconst user = await getUserData({})\n\tif (!user.data) return\n\tcurrentPlayerId = user.data?.userId\n})\n", "import {\n\tengine,\n\tinputSystem,\n\tInputAction,\n\tPointerEventType,\n\tEntity,\n\tTransform,\n\tAvatarAttach,\n\tAvatarAnchorPointType,\n\tAnimator,\n\tNetworkParent\n} from '@dcl/sdk/ecs'\nimport { Vector3, Quaternion } from '@dcl/sdk/math'\nimport { BeerGlass, PickedUp, TapBase } from '../definitions'\nimport { playSound } from './factory'\nimport { currentPlayerId, getPlayerPosition } from './helpers'\nimport { parentEntity, syncEntity, getParent, getChildren, removeParent } from '@dcl/sdk/network'\n\nexport function pickingGlassSystem() {\n\t// Drop beer\n\t// Only happens if the player has a beer picked up\n\tfor (const [entity, pickedUp] of engine.getEntitiesWith(PickedUp)) {\n\t\tconst tryToDropCommand = inputSystem.getInputCommand(InputAction.IA_PRIMARY, PointerEventType.PET_DOWN)\n\t\tconst pickedUpChild = Array.from(getChildren(entity))[0]\n\t\tif (pickedUp.avatarId !== currentPlayerId || !pickedUpChild) continue\n\t\t//if (!pickedUpChild) break\n\t\tif (tryToDropCommand) {\n\t\t\tconst hitPosition = tryToDropCommand.hit?.position || getPlayerPosition()\n\t\t\tconst hitEntity = tryToDropCommand.hit?.entityId as Entity\n\t\t\tconst hitParentEntity = getParent(hitEntity)\n\n\t\t\tlet drop = false\n\n\t\t\t// If dropping on a tap base (the collider)\n\t\t\tif (hitParentEntity && TapBase.getOrNull(hitParentEntity)) {\n\t\t\t\tTransform.createOrReplace(pickedUpChild, {\n\t\t\t\t\t//parent: hitParentEntity\n\t\t\t\t})\n\t\t\t\tparentEntity(pickedUpChild, hitParentEntity)\n\t\t\t\tconsole.log(\"parented to a tap, \", hitParentEntity, TapBase.getOrNull(hitParentEntity)?.beerType)\n\t\t\t\tdrop = true\n\t\t\t} else {\n\t\t\t\t// if not a tap base\n\t\t\t\t// the surface must be parallel to floor\n\t\t\t\tconst diff = Vector3.subtract(Vector3.Up(), tryToDropCommand.hit?.normalHit || Vector3.Zero())\n\t\t\t\tif (Vector3.length(diff) < 0.01) {\n\t\t\t\t\tremoveParent(pickedUpChild)\n\t\t\t\t\tTransform.createOrReplace(pickedUpChild, {\n\t\t\t\t\t\tposition: hitPosition,\n\t\t\t\t\t\t//parent: engine.RootEntity\n\t\t\t\t\t})\n\n\t\t\t\t\tdrop = true\n\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// TODO: These line crashes the renderer\n\t\t\t// AvatarAttach.deleteFrom(entity)\n\t\t\t// engine.removeEntity(entity)\n\t\t\tif (drop) {\n\t\t\t\tPickedUp.deleteFrom(entity)\n\t\t\t\tplaySound('sounds/putDown.mp3', false, pickedUpChild)\n\t\t\t}\n\t\t}\n\n\n\t\tconst glass = BeerGlass.get(pickedUpChild)\n\n\t\tconst tryToDrinkCommand = inputSystem.getInputCommand(InputAction.IA_SECONDARY, PointerEventType.PET_DOWN)\n\t\tif (glass.filled && tryToDrinkCommand) {\n\t\t\tBeerGlass.getMutable(pickedUpChild).filled = false\n\t\t\tAnimator.playSingleAnimation(pickedUpChild, 'Blank')\n\t\t\tplaySound('sounds/swallow.mp3', false, pickedUpChild)\n\t\t}\n\t\treturn\n\t}\n\n\t// Pick up beer\n\t// Only happens when there isn't any PickedUp component\n\tfor (const [entity, glass] of engine.getEntitiesWith(BeerGlass)) {\n\t\tif (!glass.beingFilled && inputSystem.isTriggered(InputAction.IA_PRIMARY, PointerEventType.PET_DOWN, entity)) {\n\t\t\tconst parentBeer = engine.addEntity()\n\t\t\tPickedUp.create(parentBeer, { avatarId: currentPlayerId })\n\n\t\t\tAvatarAttach.create(parentBeer, {\n\t\t\t\tavatarId: currentPlayerId,\n\t\t\t\tanchorPointId: AvatarAnchorPointType.AAPT_RIGHT_HAND\n\t\t\t})\n\t\t\tTransform.createOrReplace(entity, {\n\t\t\t\tposition: Vector3.create(0, 0.225, 0),\n\t\t\t\trotation: Quaternion.fromEulerDegrees(180, -90, -60),\n\t\t\t\t//parent: parentBeer\n\t\t\t})\n\n\t\t\tsyncEntity(parentBeer, [AvatarAttach.componentId, Transform.componentId, PickedUp.componentId])\n\n\t\t\tparentEntity(entity, parentBeer)\n\n\t\t\tplaySound('sounds/pickUp.mp3', false, entity)\n\t\t}\n\t}\n}\n\n\n", "import { Animator, engine, InputAction, inputSystem, PointerEventType, Transform } from '@dcl/sdk/ecs'\nimport { Scalar } from '@dcl/sdk/math'\nimport { BeerGlass, BeerType, getTapData, TapBase, TapComponent } from '../definitions'\nimport { playSound } from './factory'\nimport { getPlayerPosition } from './helpers'\nimport { getParent } from '@dcl/sdk/network'\n\n\nfunction getBeerBehindTap(beerType: BeerType) {\n\tfor (const [glassEntity] of engine.getEntitiesWith(BeerGlass)) {\n\t\tconst glassParent = getParent(glassEntity)\n\n\t\tif (glassParent && TapBase.getOrNull(glassParent)?.beerType === beerType) {\n\t\t\treturn glassEntity\n\t\t}\n\t}\n}\n\nexport function tapPumpSystem(dt: number) {\n\tfor (const [entity, tapReadonly] of engine.getEntitiesWith(TapComponent)) {\n\t\t// While is pouring\n\t\tif (tapReadonly.pouring) {\n\t\t\t// At start the pouring, play the sound an animation\n\t\t\tif (Scalar.withinEpsilon(tapReadonly.pouringTime, 0)) {\n\t\t\t\tAnimator.playSingleAnimation(entity, `Pour`)\n\t\t\t\tplaySound('sounds/beerPump.mp3', false, entity)\n\t\t\t\tconst glassEntity = getBeerBehindTap(tapReadonly.beerType)\n\t\t\t\tif (glassEntity) Animator.playSingleAnimation(glassEntity, `Pour${getTapData(tapReadonly.beerType).name}`)\n\t\t\t}\n\n\t\t\tconst tap = TapComponent.getMutable(entity)\n\t\t\ttap.pouringTime += dt\n\n\t\t\tif (tap.pouringTime >= 2.5) {\n\t\t\t\ttap.pouring = false\n\t\t\t\ttap.pouringTime = 0\n\n\t\t\t\tconst glassEntity = getBeerBehindTap(tap.beerType)\n\t\t\t\tif (glassEntity) {\n\t\t\t\t\tconst glass = BeerGlass.getMutable(glassEntity)\n\t\t\t\t\tglass.beerType = tap.beerType\n\t\t\t\t\tglass.beingFilled = false\n\t\t\t\t\tglass.filled = true\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Listen the action\n\t\t} else if (inputSystem.isTriggered(InputAction.IA_PRIMARY, PointerEventType.PET_DOWN, entity)) {\n\t\t\tconst glassEntity = getBeerBehindTap(tapReadonly.beerType)\n\t\t\tif (!glassEntity) {\n\t\t\t\t// TODO: notify that there is no glass\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst glass = BeerGlass.getMutable(glassEntity)\n\t\t\tif (glass.filled) {\n\t\t\t\t// TODO: notify that the glass is filled\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst tap = TapComponent.getMutable(entity)\n\t\t\ttap.pouring = true\n\t\t\ttap.pouringTime = 0\n\n\t\t\tglass.beingFilled = true\n\t\t\tglass.beerType = tap.beerType\n\t\t}\n\t}\n}\n", "import { engine, GltfContainer, PointerEvents, PointerEventType, Transform } from '@dcl/sdk/ecs'\nimport { Vector3, Quaternion } from '@dcl/sdk/math'\nimport { BeerType } from './definitions'\nimport { pickingGlassSystem } from './modules/beerGlass'\nimport { createBeerGlass, createTap, SyncEntityIDs } from './modules/factory'\nimport { tapPumpSystem } from './modules/tap'\nimport { setupUi } from './ui'\nimport { syncEntity } from '@dcl/sdk/network'\n\nexport function main() {\n\t// Create tables\n\tconst tables = engine.addEntity()\n\tTransform.create(tables, {\n\t\tposition: Vector3.create(0, 0, 0)\n\t})\n\tGltfContainer.create(tables, { src: 'models/tables.glb' })\n\tPointerEvents.create(tables, {\n\t\tpointerEvents: [\n\t\t\t{\n\t\t\t\teventType: PointerEventType.PET_DOWN,\n\t\t\t\teventInfo: {\n\t\t\t\t\tshowFeedback: false\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t})\n\n\t// Create floor\n\tconst floor = engine.addEntity()\n\tTransform.create(floor, {\n\t\tposition: Vector3.create(0, 0, 0)\n\t})\n\tGltfContainer.create(floor, {\n\t\tsrc: 'models/baseDarkWithCollider.glb'\n\t})\n\tPointerEvents.create(floor, {\n\t\tpointerEvents: [\n\t\t\t{\n\t\t\t\teventType: PointerEventType.PET_DOWN,\n\t\t\t\teventInfo: {\n\t\t\t\t\tshowFeedback: false\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t})\n\tsyncEntity(floor, [], SyncEntityIDs.TABLES)\n\n\t// Create dispenser\n\tconst dispenserEntity = engine.addEntity()\n\tGltfContainer.create(dispenserEntity, {\n\t\tsrc: 'models/beerDispenser.glb'\n\t})\n\tTransform.create(dispenserEntity, {\n\t\tposition: Vector3.create(8, 1.25, 7.5)\n\t})\n\n\t// Create taps\n\tcreateTap(BeerType.RED, dispenserEntity, SyncEntityIDs.RED)\n\tcreateTap(BeerType.GREEN, dispenserEntity, SyncEntityIDs.GREEN)\n\tcreateTap(BeerType.YELLOW, dispenserEntity, SyncEntityIDs.YELLOW)\n\n\t// Beer glasses\n\tconst beerGlassModel = 'models/beerGlass.glb'\n\tcreateBeerGlass(beerGlassModel, Vector3.create(8.3, 1.25, 8), SyncEntityIDs.GLASS1)\n\tcreateBeerGlass(beerGlassModel, Vector3.create(7.8, 1.25, 8.3), SyncEntityIDs.GLASS2)\n\tcreateBeerGlass(beerGlassModel, Vector3.create(1.86, 0.8, 13.4), SyncEntityIDs.GLASS3)\n\tcreateBeerGlass(beerGlassModel, Vector3.create(2.3, 0.8, 14), SyncEntityIDs.GLASS4)\n\tcreateBeerGlass(beerGlassModel, Vector3.create(13.7, 0.8, 13.8), SyncEntityIDs.GLASS5)\n\tcreateBeerGlass(beerGlassModel, Vector3.create(13.9, 0.8, 14.3), SyncEntityIDs.GLASS6)\n\tcreateBeerGlass(beerGlassModel, Vector3.create(14.5, 0.8, 2.5), SyncEntityIDs.GLASS7)\n\tcreateBeerGlass(beerGlassModel, Vector3.create(13.7, 0.8, 1.9), SyncEntityIDs.GLASS8)\n\tcreateBeerGlass(beerGlassModel, Vector3.create(2.4, 0.8, 1.5), SyncEntityIDs.GLASS9)\n\n\tengine.addSystem(pickingGlassSystem)\n\tengine.addSystem(tapPumpSystem)\n\n\t// UI with GitHub link\n\t//setupUi()\n\n}\n", "/** @alpha THIS FILE INITIALIZES THE DECENTRALAND RUNTIME. WILL CHANGE SOON */\nimport { Composite, engine } from '@dcl/ecs'\nimport { crdtGetState, crdtSendToRenderer, sendBatch } from '~system/EngineApi'\nimport { createRendererTransport } from './internal/transports/rendererTransport'\nimport { pollEvents } from './observables'\nimport { compositeProvider } from './composite-provider'\n\n// Attach CRDT transport\n// @internal\nexport const rendererTransport = createRendererTransport({ crdtSendToRenderer })\nengine.addTransport(rendererTransport)\n\nexport async function onUpdate(deltaTime: number) {\n engine.seal()\n await engine.update(deltaTime)\n await pollEvents(sendBatch)\n}\n\n/**\n * @internal\n * Function that is called before the first update and after the evaluation of the code.\n */\nexport async function onStart() {\n const response = await crdtGetState({ data: new Uint8Array() })\n\n // when this condition is true something like `main.crdt` was pre-loaded from the runtime, we don't need to instance the main.composite\n if (!response.hasEntities) {\n const mainComposite = compositeProvider.getCompositeOrNull('main.composite')\n if (mainComposite) {\n try {\n Composite.instance(engine, mainComposite, compositeProvider)\n } catch (err) {\n console.log(`Warning: main.composite couldn't be instanced.`)\n console.error(err)\n }\n }\n }\n\n if (!!rendererTransport.onmessage) {\n if (response && response.data && response.data.length) {\n for (const byteArray of response.data) {\n rendererTransport.onmessage(byteArray)\n }\n }\n }\n}\n", "import { Transport, TransportMessage } from '@dcl/ecs'\nimport { MAX_STATIC_COMPONENT } from '@dcl/ecs/dist/components/component-number'\nimport type { CrdtSendToRendererRequest, CrdtSendToResponse } from '~system/EngineApi'\n\nexport type EngineApiForTransport = {\n crdtSendToRenderer(body: CrdtSendToRendererRequest): Promise\n}\n\nexport function createRendererTransport(engineApi: EngineApiForTransport): Transport {\n async function sendToRenderer(message: Uint8Array) {\n const response = await engineApi.crdtSendToRenderer({\n data: new Uint8Array(message)\n })\n\n if (response && response.data && response.data.length) {\n if (rendererTransport.onmessage) {\n for (const byteArray of response.data) {\n rendererTransport.onmessage(byteArray)\n }\n }\n }\n }\n\n const rendererTransport: Transport = {\n async send(message) {\n try {\n await sendToRenderer(message)\n } catch (error) {\n // this is the console.error of the scene\n // eslint-disable-next-line no-console\n console.error(error)\n debugger\n }\n },\n filter(message: TransportMessage) {\n // Only send renderer components (Proto Generated)\n if (\n // filter out messages for non-core components\n (message as any).componentId > MAX_STATIC_COMPONENT\n ) {\n return false\n }\n\n return !!message\n },\n type: 'renderer'\n }\n\n return rendererTransport\n}\n", "/* istanbul ignore file */\n/**\n * A class serves as a medium between the observable and its observers\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed\n */\nexport class ObserverEventState {\n /**\n * An Observer can set this property to true to prevent subsequent observers of being notified\n */\n public skipNextObservers!: boolean\n\n /**\n * Get the mask value that were used to trigger the event corresponding to this EventState object\n */\n public mask!: number\n\n /**\n * The object that originally notified the event\n */\n public target?: any\n\n /**\n * The current object in the bubbling phase\n */\n public currentTarget?: any\n\n /**\n * This will be populated with the return value of the last function that was executed.\n * If it is the first function in the callback chain it will be the event data.\n */\n public lastReturnValue?: any\n\n /**\n * Create a new EventState\n * @param mask - defines the mask associated with this state\n * @param skipNextObservers - defines a flag which will instruct the observable to skip following observers when set to true\n * @param target - defines the original target of the state\n * @param currentTarget - defines the current target of the state\n */\n constructor(mask: number, skipNextObservers = false, target?: any, currentTarget?: any) {\n this.initalize(mask, skipNextObservers, target, currentTarget)\n }\n\n /**\n * Initialize the current event state\n * @param mask - defines the mask associated with this state\n * @param skipNextObservers - defines a flag which will instruct the observable to skip following observers when set to true\n * @param target - defines the original target of the state\n * @param currentTarget - defines the current target of the state\n * @returns the current event state\n */\n public initalize(mask: number, skipNextObservers = false, target?: any, currentTarget?: any): ObserverEventState {\n this.mask = mask\n this.skipNextObservers = skipNextObservers\n this.target = target\n this.currentTarget = currentTarget\n return this\n }\n}\n\n/**\n * Represent an Observer registered to a given Observable object.\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed\n */\nexport class Observer {\n /**\n * Gets or sets a property defining that the observer as to be unregistered after the next notification\n */\n public unregisterOnNextCall = false\n\n /** For internal usage */\n public _willBeUnregistered = false\n\n /**\n * Creates a new observer\n * @param callback - defines the callback to call when the observer is notified\n * @param mask - defines the mask of the observer (used to filter notifications)\n * @param scope - defines the current scope used to restore the JS context\n */\n constructor(\n /**\n * Defines the callback to call when the observer is notified\n */\n public callback: (eventData: T, eventState: ObserverEventState) => void,\n /**\n * Defines the mask of the observer (used to filter notifications)\n */\n public mask: number,\n /**\n * Defines the current scope used to restore the JS context\n */\n public scope: any = null\n ) {}\n}\n\n/**\n * The Observable class is a simple implementation of the Observable pattern.\n *\n * There's one slight particularity though: a given Observable can notify its observer using a particular mask value, only the Observers registered with this mask value will be notified.\n * This enable a more fine grained execution without having to rely on multiple different Observable objects.\n * For instance you may have a given Observable that have four different types of notifications: Move (mask = 0x01), Stop (mask = 0x02), Turn Right (mask = 0X04), Turn Left (mask = 0X08).\n * A given observer can register itself with only Move and Stop (mask = 0x03), then it will only be notified when one of these two occurs and will never be for Turn Left/Right.\n *\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed\n */\nexport class Observable {\n private _observers = new Array>()\n\n private _eventState: ObserverEventState\n\n private _onObserverAdded: null | ((observer: Observer) => void) = null\n\n /**\n * Creates a new observable\n * @param onObserverAdded - defines a callback to call when a new observer is added\n */\n constructor(onObserverAdded?: (observer: Observer) => void) {\n this._eventState = new ObserverEventState(0)\n\n if (onObserverAdded) {\n this._onObserverAdded = onObserverAdded\n }\n }\n\n /**\n * Create a new Observer with the specified callback\n * @param callback - the callback that will be executed for that Observer\n * @param mask - the mask used to filter observers\n * @param insertFirst - if true the callback will be inserted at the first position, hence executed before the others ones. If false (default behavior) the callback will be inserted at the last position, executed after all the others already present.\n * @param scope - optional scope for the callback to be called from\n * @param unregisterOnFirstCall - defines if the observer as to be unregistered after the next notification\n * @returns the new observer created for the callback\n */\n public add(\n callback: (eventData: T, eventState: ObserverEventState) => void,\n mask: number = -1,\n insertFirst = false,\n scope: any = null,\n unregisterOnFirstCall = false\n ): null | Observer {\n if (!callback) {\n return null\n }\n\n const observer = new Observer(callback, mask, scope)\n observer.unregisterOnNextCall = unregisterOnFirstCall\n\n if (insertFirst) {\n this._observers.unshift(observer)\n } else {\n this._observers.push(observer)\n }\n\n if (this._onObserverAdded) {\n this._onObserverAdded(observer)\n }\n\n return observer\n }\n\n /**\n * Create a new Observer with the specified callback and unregisters after the next notification\n * @param callback - the callback that will be executed for that Observer\n * @returns the new observer created for the callback\n */\n public addOnce(callback: (eventData: T, eventState: ObserverEventState) => void): null | Observer {\n return this.add(callback, undefined, undefined, undefined, true)\n }\n\n /**\n * Remove an Observer from the Observable object\n * @param observer - the instance of the Observer to remove\n * @returns false if it doesn't belong to this Observable\n */\n public remove(observer: null | Observer): boolean {\n if (!observer) {\n return false\n }\n\n const index = this._observers.indexOf(observer)\n\n if (index !== -1) {\n this._deferUnregister(observer)\n return true\n }\n\n return false\n }\n\n /**\n * Remove a callback from the Observable object\n * @param callback - the callback to remove\n * @param scope - optional scope. If used only the callbacks with this scope will be removed\n * @returns false if it doesn't belong to this Observable\n */\n public removeCallback(callback: (eventData: T, eventState: ObserverEventState) => void, scope?: any): boolean {\n for (let index = 0; index < this._observers.length; index++) {\n if (this._observers[index].callback === callback && (!scope || scope === this._observers[index].scope)) {\n this._deferUnregister(this._observers[index])\n return true\n }\n }\n\n return false\n }\n\n /**\n * Notify all Observers by calling their respective callback with the given data\n * Will return true if all observers were executed, false if an observer set skipNextObservers to true, then prevent the subsequent ones to execute\n * @param eventData - defines the data to send to all observers\n * @param mask - defines the mask of the current notification (observers with incompatible mask (ie mask & observer.mask === 0) will not be notified)\n * @param target - defines the original target of the state\n * @param currentTarget - defines the current target of the state\n * @returns false if the complete observer chain was not processed (because one observer set the skipNextObservers to true)\n */\n public notifyObservers(eventData: T, mask: number = -1, target?: any, currentTarget?: any): boolean {\n if (!this._observers.length) {\n return true\n }\n\n const state = this._eventState\n state.mask = mask\n state.target = target\n state.currentTarget = currentTarget\n state.skipNextObservers = false\n state.lastReturnValue = eventData\n\n for (const obs of this._observers) {\n if (obs._willBeUnregistered) {\n continue\n }\n\n if (obs.mask & mask) {\n if (obs.scope) {\n state.lastReturnValue = obs.callback.apply(obs.scope, [eventData, state])\n } else {\n state.lastReturnValue = obs.callback(eventData, state)\n }\n\n if (obs.unregisterOnNextCall) {\n this._deferUnregister(obs)\n }\n }\n if (state.skipNextObservers) {\n return false\n }\n }\n return true\n }\n\n /**\n * Calling this will execute each callback, expecting it to be a promise or return a value.\n * If at any point in the chain one function fails, the promise will fail and the execution will not continue.\n * This is useful when a chain of events (sometimes async events) is needed to initialize a certain object\n * and it is crucial that all callbacks will be executed.\n * The order of the callbacks is kept, callbacks are not executed parallel.\n *\n * @param eventData - The data to be sent to each callback\n * @param mask - is used to filter observers defaults to -1\n * @param target - defines the callback target (see EventState)\n * @param currentTarget - defines he current object in the bubbling phase\n * @returns will return a Promise than resolves when all callbacks executed successfully.\n */\n public notifyObserversWithPromise(eventData: T, mask: number = -1, target?: any, currentTarget?: any): Promise {\n // create an empty promise\n let p: Promise = Promise.resolve(eventData)\n\n // no observers? return this promise.\n if (!this._observers.length) {\n return p\n }\n\n const state = this._eventState\n state.mask = mask\n state.target = target\n state.currentTarget = currentTarget\n state.skipNextObservers = false\n\n // execute one callback after another (not using Promise.all, the order is important)\n this._observers.forEach((obs) => {\n if (state.skipNextObservers) {\n return\n }\n if (obs._willBeUnregistered) {\n return\n }\n if (obs.mask & mask) {\n if (obs.scope) {\n p = p.then((lastReturnedValue) => {\n state.lastReturnValue = lastReturnedValue\n return obs.callback.apply(obs.scope, [eventData, state])\n })\n } else {\n p = p.then((lastReturnedValue) => {\n state.lastReturnValue = lastReturnedValue\n return obs.callback(eventData, state)\n })\n }\n if (obs.unregisterOnNextCall) {\n this._deferUnregister(obs)\n }\n }\n })\n\n // return the eventData\n return p.then(() => {\n return eventData\n })\n }\n\n /**\n * Notify a specific observer\n * @param observer - defines the observer to notify\n * @param eventData - defines the data to be sent to each callback\n * @param mask - is used to filter observers defaults to -1\n */\n public notifyObserver(observer: Observer, eventData: T, mask: number = -1): void {\n const state = this._eventState\n state.mask = mask\n state.skipNextObservers = false\n\n observer.callback(eventData, state)\n }\n\n /**\n * Gets a boolean indicating if the observable has at least one observer\n * @returns true is the Observable has at least one Observer registered\n */\n public hasObservers(): boolean {\n return this._observers.length > 0\n }\n\n /**\n * Clear the list of observers\n */\n public clear(): void {\n this._observers = new Array>()\n this._onObserverAdded = null\n }\n\n /**\n * Clone the current observable\n * @returns a new observable\n */\n public clone(): Observable {\n const result = new Observable()\n\n result._observers = this._observers.slice(0)\n\n return result\n }\n\n /**\n * Does this observable handles observer registered with a given mask\n * @param mask - defines the mask to be tested\n * @returns whether or not one observer registered with the given mask is handeled\n */\n public hasSpecificMask(mask: number = -1): boolean {\n for (const obs of this._observers) {\n if (obs.mask & mask || obs.mask === mask) {\n return true\n }\n }\n return false\n }\n\n private _deferUnregister(observer: Observer): void {\n observer.unregisterOnNextCall = false\n observer._willBeUnregistered = true\n Promise.resolve()\n .then.bind(Promise.resolve())(async () => this._remove(observer))\n .catch(console.error)\n }\n\n // This should only be called when not iterating over _observers to avoid callback skipping.\n // Removes an observer from the _observer Array.\n private _remove(observer: null | Observer): boolean {\n if (!observer) {\n return false\n }\n\n const index = this._observers.indexOf(observer)\n\n if (index !== -1) {\n this._observers.splice(index, 1)\n return true\n }\n\n return false\n }\n}\n", "import { Observable } from './internal/Observable'\nimport { QuaternionType, Vector3Type } from '@dcl/ecs'\nimport { ManyEntityAction, SendBatchResponse, subscribe } from '~system/EngineApi'\n\nlet subscribeFunction: typeof subscribe = subscribe\n\n/** @public */\nexport type InputEventResult = {\n /** Origin of the ray, relative to the scene */\n origin: Vector3Type\n /** Direction vector of the ray (normalized) */\n direction: Vector3Type\n /** ID of the pointer that triggered the event */\n buttonId: number\n /** Does this pointer event hit any object? */\n hit?: {\n /** Length of the ray */\n length: number\n /** If the ray hits a mesh the intersection point will be this */\n hitPoint: Vector3Type\n /** If the mesh has a name, it will be assigned to meshName */\n meshName: string\n /** Normal of the hit */\n normal: Vector3Type\n /** Normal of the hit, in world space */\n worldNormal: Vector3Type\n /** Hit entity ID if any */\n entityId: unknown\n }\n}\n\n/** @public */\nexport type GlobalInputEventResult = InputEventResult & {\n /**\n * DOWN = 0,\n * UP = 1\n */\n type: 0 | 1\n}\n\n/** @public */\nexport type RaycastResponsePayload = {\n queryId: string\n queryType: string\n payload: T\n}\n\n/** @public */\nexport type GizmoDragEndEvent = {\n type: 'gizmoDragEnded'\n transforms: Array<{\n position: Vector3Type\n rotation: QuaternionType\n scale: Vector3Type\n entityId: unknown\n }>\n}\n\n/** @public */\nexport type GizmoSelectedEvent = {\n type: 'gizmoSelected'\n gizmoType: 'MOVE' | 'ROTATE' | 'SCALE' | 'NONE'\n entities: string[]\n}\n\n/// --- EVENTS ---\n\n/** @public */\nexport type IEventNames = keyof IEvents\n\n/** @public */\nexport type EngineEvent = {\n /** eventName */\n type: T\n data: Readonly\n}\n\n/**\n * @public\n * Note: Don't use `on` prefix for IEvents to avoid redundancy with `event.on(\"onEventName\")` syntax.\n */\nexport interface IEvents {\n /**\n * `positionChanged` is triggered when the position of the camera changes\n * This event is throttled to 10 times per second.\n */\n positionChanged: {\n /** Camera position relative to the base parcel of the scene */\n position: Vector3Type\n\n /** Camera position, this is a absolute world position */\n cameraPosition: Vector3Type\n\n /** Eye height, in meters. */\n playerHeight: number\n }\n\n /**\n * `rotationChanged` is triggered when the rotation of the camera changes.\n * This event is throttled to 10 times per second.\n */\n rotationChanged: {\n /** Degree vector. Same as entities */\n rotation: Vector3Type\n /** Rotation quaternion, useful in some scenarios. */\n quaternion: QuaternionType\n }\n\n /**\n * `cameraModeChanged` is triggered when the user changes the camera mode\n */\n cameraModeChanged: {\n /**\n * FIRST_PERSON = 0,\n * THIRD_PERSON = 1,\n * FREE_CAMERA = 2\n */\n cameraMode: 0 | 1 | 2\n }\n\n /**\n * `idleStateChanged` is triggered when the user not moves for a defined period of time\n */\n idleStateChanged: {\n isIdle: boolean\n }\n\n playerExpression: {\n expressionId: string\n }\n\n /**\n * `pointerUp` is triggered when the user releases an input pointer.\n * It could be a VR controller, a touch screen or the mouse.\n */\n pointerUp: InputEventResult\n\n /**\n * `pointerDown` is triggered when the user press an input pointer.\n * It could be a VR controller, a touch screen or the mouse.\n */\n pointerDown: InputEventResult\n\n /**\n * `pointerEvent` is triggered when the user press or releases an input pointer.\n * It could be a VR controller, a touch screen or the mouse.\n *\n * @deprecated use actionButtonEvent instead\n */\n pointerEvent: GlobalInputEventResult\n\n /**\n * `actionButtonEvent` is triggered when the user press or releases an input pointer.\n * It could be a VR controller, a touch screen or the mouse.\n *\n * This event is exactly the same as `pointerEvent` but the logic in the ECS had an unsolvable\n * condition that required us to create this new event to handle more cases for new buttons.\n */\n actionButtonEvent: GlobalInputEventResult\n\n /**\n * `raycastResponse` is triggered in response to a raycast query\n */\n raycastResponse: RaycastResponsePayload\n\n /**\n * `chatMessage` is triggered when the user sends a message through chat entity.\n */\n chatMessage: {\n id: string\n sender: string\n message: string\n isCommand: boolean\n }\n\n /**\n * `onChange` is triggered when an entity changes its own internal state.\n * Dispatched by the `ui-*` entities when their value is changed. It triggers a callback.\n * Notice: Only entities with ID will be listening for click events.\n */\n onChange: {\n value?: any\n /** ID of the pointer that triggered the event */\n pointerId?: number\n }\n\n /**\n * `onEnter` is triggered when the user hits the \"Enter\" key from the keyboard\n * Used principally by the Chat internal scene\n */\n onEnter: unknown\n\n /**\n * `onPointerLock` is triggered when the user clicks the world canvas and the\n * pointer locks to it so the pointer moves the camera\n */\n onPointerLock: {\n locked?: boolean\n }\n\n /**\n * `onAnimationEnd` is triggered when an animation clip gets finish\n */\n onAnimationEnd: {\n clipName: string\n }\n\n /**\n * `onFocus` is triggered when an entity focus is active.\n * Dispatched by the `ui-input` and `ui-password` entities when the value is changed.\n * It triggers a callback.\n *\n * Notice: Only entities with ID will be listening for click events.\n */\n onFocus: {\n /** ID of the entitiy of the event */\n entityId: unknown\n /** ID of the pointer that triggered the event */\n pointerId: number\n }\n\n /**\n * `onBlur` is triggered when an entity loses its focus.\n * Dispatched by the `ui-input` and `ui-password` entities when the value is changed.\n * It triggers a callback.\n *\n * Notice: Only entities with ID will be listening for click events.\n */\n onBlur: {\n /** ID of the entitiy of the event */\n entityId: unknown\n /** ID of the pointer that triggered the event */\n pointerId: number\n }\n\n /** The onClick event is only used for UI elements */\n onClick: {\n entityId: unknown\n }\n\n /**\n * This event gets triggered when an entity leaves the scene fences.\n */\n entityOutOfScene: {\n entityId: unknown\n }\n\n /**\n * This event gets triggered when an entity enters the scene fences.\n */\n entityBackInScene: {\n entityId: unknown\n }\n\n /**\n * This event gets triggered when the user enters the scene\n */\n onEnterScene: {\n userId: string\n }\n\n /**\n * This event gets triggered when the user leaves the scene\n */\n onLeaveScene: {\n userId: string\n }\n\n /**\n * This event gets triggered after receiving a comms message.\n */\n comms: {\n sender: string\n message: string\n }\n\n /**\n * This is triggered once the scene should start.\n */\n sceneStart: unknown\n\n /**\n * This is triggered once the builder scene is loaded.\n */\n builderSceneStart: unknown\n\n /**\n * This is triggered once the builder scene is unloaded.\n */\n builderSceneUnloaded: unknown\n\n /**\n * After checking entities outside the fences, if any is outside, this event\n * will be triggered with all the entities outside the scene.\n */\n entitiesOutOfBoundaries: {\n entities: string[]\n }\n\n uuidEvent: {\n uuid: string\n payload: any\n }\n\n onTextSubmit: {\n text: string\n }\n\n metricsUpdate: {\n given: Record\n limit: Record\n }\n\n limitsExceeded: {\n given: Record\n limit: Record\n }\n\n /** For gizmos */\n gizmoEvent: GizmoDragEndEvent | GizmoSelectedEvent\n\n externalAction: {\n type: string\n [key: string]: any\n }\n\n stateEvent: {\n type: string\n payload: any\n }\n\n /** This is triggered at least for each videoStatus change */\n videoEvent: {\n componentId: string\n videoClipId: string\n /** Status, can be NONE = 0, ERROR = 1, LOADING = 2, READY = 3, PLAYING = 4,BUFFERING = 5 */\n videoStatus: number\n /** Current offset position in seconds */\n currentOffset: number\n /** Video length in seconds. Can be -1 */\n totalVideoLength: number\n }\n\n /** This is trigger everytime a profile is changed */\n profileChanged: {\n ethAddress: string\n version: number\n }\n\n /** Triggered when peer's avatar is connected and visible */\n playerConnected: {\n userId: string\n }\n\n /** Triggered when peer disconnect and/or it avatar is set invisible by comms */\n playerDisconnected: {\n userId: string\n }\n\n /** Triggered when current realm or island changes */\n onRealmChanged: {\n domain: string\n room: string\n serverName: string\n displayName: string\n }\n\n /** Triggered when other player's avatar is clicked */\n playerClicked: {\n userId: string\n ray: {\n origin: Vector3Type\n direction: Vector3Type\n distance: number\n }\n }\n\n /** Triggered when pointer start hovering an entities' shape */\n pointerHoverEnter: unknown\n\n /** Triggered when pointer stop hovering an entities' shape */\n pointerHoverExit: unknown\n}\n\n/**\n * @internal\n * This function generates a callback that is passed to the Observable\n * constructor to subscribe to the events of the DecentralandInterface\n */\nfunction createSubscriber(eventName: string) {\n return () => {\n subscribeFunction({ eventId: eventName }).catch(console.error)\n }\n}\n\n/**\n * These events are triggered after your character enters the scene.\n * @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n */\nexport const onEnterSceneObservable = new Observable(createSubscriber('onEnterScene'))\n/** @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed. Use onEnterSceneObservable instead. */\nexport const onEnterScene = onEnterSceneObservable\n\n/**\n * These events are triggered after your character leaves the scene.\n * @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n */\nexport const onLeaveSceneObservable = new Observable(createSubscriber('onLeaveScene'))\n\n/** @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed. Use onLeaveSceneObservable instead. */\nexport const onLeaveScene = onLeaveSceneObservable\n\n/**\n * This event is triggered after all the resources of the scene were loaded (models, textures, etc...)\n * @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n */\nexport const onSceneReadyObservable = new Observable(createSubscriber('sceneStart'))\n\n/**\n * @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n */\nexport const onPlayerExpressionObservable = new Observable(\n createSubscriber('playerExpression')\n)\n\n/**\n * @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n */\nexport const onVideoEvent = new Observable(createSubscriber('videoEvent'))\n\n/**\n * @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n */\nexport const onProfileChanged = new Observable(createSubscriber('profileChanged'))\n\n/**\n * @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n */\nexport const onPlayerConnectedObservable = new Observable(\n createSubscriber('playerConnected')\n)\n\n/**\n * @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n */\nexport const onPlayerDisconnectedObservable = new Observable(\n createSubscriber('playerDisconnected')\n)\n\n/**\n * @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n */\nexport const onRealmChangedObservable = new Observable(createSubscriber('onRealmChanged'))\n\n/**\n * @public\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n */\nexport const onPlayerClickedObservable = new Observable(createSubscriber('playerClicked'))\n\n/**\n * @internal\n * @deprecated This function is an inheritance of ECS6, it's here temporary for the feature parity, please read the news and docs to know how handle when it's removed.\n */\nexport const onCommsMessage = new Observable(createSubscriber('comms'))\n\n/**\n * @internal\n * Used for testing purpose\n */\nexport function setSubscribeFunction(fn: (event: { eventId: string }) => Promise) {\n subscribeFunction = fn\n}\n\n/**\n * @internal\n * @deprecated this is an OLD API.\n * This function uses the SDK6 sendBatch to poll events from the renderer\n */\nexport async function pollEvents(sendBatch: (body: ManyEntityAction) => Promise) {\n const { events } = await sendBatch({ actions: [] })\n for (const e of events) {\n if (e.generic) {\n const data = JSON.parse(e.generic.eventData)\n switch (e.generic.eventId) {\n case 'onEnterScene': {\n onEnterSceneObservable.notifyObservers(data as IEvents['onEnterScene'])\n break\n }\n case 'onLeaveScene': {\n onLeaveSceneObservable.notifyObservers(data as IEvents['onLeaveScene'])\n break\n }\n case 'sceneStart': {\n onSceneReadyObservable.notifyObservers(data as IEvents['sceneStart'])\n break\n }\n case 'playerExpression': {\n onPlayerExpressionObservable.notifyObservers(data as IEvents['playerExpression'])\n break\n }\n case 'videoEvent': {\n const videoData = data as IEvents['videoEvent']\n onVideoEvent.notifyObservers(videoData)\n break\n }\n case 'profileChanged': {\n onProfileChanged.notifyObservers(data as IEvents['profileChanged'])\n break\n }\n case 'playerConnected': {\n onPlayerConnectedObservable.notifyObservers(data as IEvents['playerConnected'])\n break\n }\n case 'playerDisconnected': {\n onPlayerDisconnectedObservable.notifyObservers(data as IEvents['playerDisconnected'])\n break\n }\n case 'onRealmChanged': {\n onRealmChangedObservable.notifyObservers(data as IEvents['onRealmChanged'])\n break\n }\n case 'playerClicked': {\n onPlayerClickedObservable.notifyObservers(data as IEvents['playerClicked'])\n break\n }\n case 'comms': {\n onCommsMessage.notifyObservers(data as IEvents['comms'])\n break\n }\n }\n }\n }\n}\n", "export const compositeFromLoader = {}", "import { compositeFromLoader } from '~sdk/all-composites'\nimport { Composite } from '@dcl/ecs'\n\nconst composites: Composite.Resource[] = []\n\n// @public\nexport const compositeProvider: Composite.Provider = {\n getCompositeOrNull(src: string, _currentPath?: string) {\n // TODO: resolve path from src and currentPath\n\n const fromLoader = compositeFromLoader[src]\n if (fromLoader) {\n try {\n if (fromLoader instanceof Uint8Array) {\n const composite = Composite.fromBinary(fromLoader)\n composites.push({ src, composite })\n } else if (typeof fromLoader === 'string') {\n const composite = Composite.fromJson(JSON.parse(fromLoader))\n composites.push({ src, composite })\n } else if (typeof fromLoader === 'object') {\n const composite = Composite.fromJson(fromLoader)\n composites.push({ src, composite })\n }\n } catch (err) {\n console.error(err)\n }\n\n delete compositeFromLoader[src]\n }\n\n return composites.find((item) => item.src === src) || null\n }\n}\n"], - "mappings": "0oBAAA,IAAAA,GAAAC,GAAA,CAAAC,GAAAC,KAAA,cACAA,GAAO,QAAUC,GAmBjB,SAASA,GAAUC,EAAIC,EAAmB,CAKtC,QAJIC,EAAU,IAAI,MAAM,UAAU,OAAS,CAAC,EACxCC,EAAU,EACVC,EAAU,EACVC,EAAU,GACPD,EAAQ,UAAU,QACrBF,EAAOC,GAAQ,EAAI,UAAUC,GAAO,EACxC,OAAO,IAAI,QAAQ,SAAkBE,EAASC,EAAQ,CAClDL,EAAOC,CAAM,EAAI,SAAkBK,EAAmB,CAClD,GAAIH,EAEA,GADAA,EAAU,GACNG,EACAD,EAAOC,CAAG,MACT,CAGD,QAFIN,EAAS,IAAI,MAAM,UAAU,OAAS,CAAC,EACvCC,EAAS,EACNA,EAASD,EAAO,QACnBA,EAAOC,GAAQ,EAAI,UAAUA,CAAM,EACvCG,EAAQ,MA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AC5D,QAAQ,MAAMA,CAAG,GAKvB,GAAMX,GAAkB,WAClBO,GAAYA,EAAS,MAAQA,EAAS,KAAK,OAC7C,QAAWK,KAAaL,EAAS,KAC/BP,GAAkB,UAAUY,CAAS,CAI7C,C3KvCA,GAAwBC,KAAS,OAAW,CAC1C,IAASC,EAAT,UAAoC,CAClC,IAAMC,EAAmCF,GAAK,EAC1CE,GAAgB,OAAOA,GAAiB,UAAY,OAAQA,EAA6C,MAAS,YACpHA,EAAa,MAAM,QAAQ,KAAK,EAElCC,GAAO,aAAaF,CAAwB,CAC9C,EACAE,GAAO,UAAUF,EAA0B,GAAQ,CACrD", - "names": ["require_aspromise", "__commonJSMin", "exports", "module", "asPromise", "fn", "ctx", "params", "offset", "index", "pending", "resolve", "reject", "err", "require_base64", "__commonJSMin", "exports", "base64", "string", "p", "n", "b64", "s64", "i", "buffer", "start", "end", "parts", "chunk", "j", "t", "b", "invalidEncoding", "offset", "c", "require_eventemitter", "__commonJSMin", "exports", "module", "EventEmitter", "evt", "fn", "ctx", "listeners", "i", "args", "require_float", "__commonJSMin", "exports", "module", "factory", "f32", "f8b", "le", "writeFloat_f32_cpy", "val", "buf", "pos", "writeFloat_f32_rev", "readFloat_f32_cpy", "readFloat_f32_rev", "writeFloat_ieee754", "writeUint", "sign", "exponent", "mantissa", "writeUintLE", "writeUintBE", "readFloat_ieee754", "readUint", "uint", "readUintLE", "readUintBE", "f64", "writeDouble_f64_cpy", "writeDouble_f64_rev", "readDouble_f64_cpy", "readDouble_f64_rev", "writeDouble_ieee754", "off0", "off1", "readDouble_ieee754", "lo", "hi", "require_inquire", "__commonJSMin", "require_utf8", "__commonJSMin", "exports", "utf8", "string", "len", "c", "i", "buffer", "start", "end", "parts", "chunk", "t", "offset", "c1", "c2", "require_pool", "__commonJSMin", "exports", "module", "pool", "alloc", "slice", "size", "SIZE", "MAX", "slab", "offset", "buf", "require_longbits", "__commonJSMin", "exports", "module", "LongBits", "util", "lo", "hi", "zero", "zeroHash", "value", "sign", "unsigned", "charCodeAt", "hash", "mask", "part0", "part1", "part2", "require_minimal", "__commonJSMin", "exports", "util", "value", "obj", "prop", "Buffer", "sizeOrArray", "hash", "unsigned", "bits", "merge", "dst", "src", "ifNotSet", "keys", "i", "str", "newError", "name", "CustomError", "message", "properties", "fieldNames", "fieldMap", "encoding", "size", "require_writer", "__commonJSMin", "exports", "module", "Writer", "util", "BufferWriter", "LongBits", "base64", "utf8", "Op", "fn", "len", "val", "noop", "State", "writer", "create", "size", "writeByte", "buf", "pos", "writeVarint32", "VarintOp", "value", "writeVarint64", "bits", "writeFixed32", "writeBytes", "i", "head", "tail", "BufferWriter_", "require_writer_buffer", "__commonJSMin", "exports", "module", "BufferWriter", "Writer", "util", "val", "buf", "pos", "i", "value", "len", "writeStringBuffer", "require_reader", "__commonJSMin", "exports", "module", "Reader", "util", "BufferReader", "LongBits", "utf8", "indexOutOfRange", "reader", "writeLength", "buffer", "create_array", "create", "value", "readLongVarint", "bits", "i", "readFixed32_end", "buf", "end", "readFixed64", "length", "start", "nativeBuffer", "bytes", "wireType", "BufferReader_", "fn", "require_reader_buffer", "__commonJSMin", "exports", "module", "BufferReader", "Reader", "util", "buffer", "len", "require_service", "__commonJSMin", "exports", "module", "Service", "util", "rpcImpl", "requestDelimited", "responseDelimited", "rpcCall", "method", "requestCtor", "responseCtor", "request", "callback", "self", "err", "response", "endedByRPC", "require_rpc", "__commonJSMin", "exports", "rpc", "require_roots", "__commonJSMin", "exports", "module", "require_index_minimal", "__commonJSMin", "exports", "protobuf", "configure", "require_minimal", "__commonJSMin", "exports", "module", "index_ts_entry_point_exports", "__export", "main", "onStart", "onUpdate", "rendererTransport", "__toCommonJS", "import_minimal", "createBasePBAnimator", "PBAnimator", "encode", "message", "writer", "_m0", "v", "PBAnimationState", "decode", "input", "length", "reader", "end", "tag", "createBasePBAnimationState", "AnimatorSchema", "value", "builder", "writer", "PBAnimator", "buffer", "reader", "import_minimal", "createBasePBAudioSource", "PBAudioSource", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "AudioSourceSchema", "value", "builder", "writer", "PBAudioSource", "buffer", "reader", "import_minimal", "createBasePBAudioStream", "PBAudioStream", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "AudioStreamSchema", "value", "builder", "writer", "PBAudioStream", "buffer", "reader", "import_minimal", "AvatarAnchorPointType", "createBasePBAvatarAttach", "PBAvatarAttach", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "AvatarAttachSchema", "value", "builder", "writer", "PBAvatarAttach", "buffer", "reader", "import_minimal", "import_minimal", "createBasePosition", "Position", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "createBaseVector3", "Vector3", "createBaseVector2", "Vector2", "createBaseQuaternion", "Quaternion", "AvatarModifierType", "createBasePBAvatarModifierArea", "PBAvatarModifierArea", "encode", "message", "writer", "_m0", "Vector3", "v", "decode", "input", "length", "reader", "end", "tag", "end2", "AvatarModifierAreaSchema", "value", "builder", "writer", "PBAvatarModifierArea", "buffer", "reader", "wasm", "Long", "low", "high", "unsigned", "isLong", "obj", "ctz32", "value", "c", "INT_CACHE", "UINT_CACHE", "fromInt", "cachedObj", "cache", "fromBits", "fromNumber", "UZERO", "ZERO", "TWO_PWR_64_DBL", "MAX_UNSIGNED_VALUE", "TWO_PWR_63_DBL", "MIN_VALUE", "MAX_VALUE", "TWO_PWR_32_DBL", "lowBits", "highBits", "pow_dbl", "fromString", "str", "radix", "p", "radixToPower", "result", "i", "size", "power", "fromValue", "val", "TWO_PWR_16_DBL", "TWO_PWR_24_DBL", "TWO_PWR_24", "ONE", "UONE", "NEG_ONE", "LongPrototype", "radixLong", "div", "rem1", "rem", "remDiv", "intval", "digits", "bit", "other", "thisNeg", "otherNeg", "addend", "a48", "a32", "a16", "a00", "b48", "b32", "b16", "b00", "c48", "c32", "c16", "c00", "subtrahend", "multiplier", "divisor", "approx", "res", "halfThis", "log2", "delta", "approxRes", "approxRem", "numBits", "b", "le", "hi", "lo", "bytes", "long_default", "import_minimal", "import_minimal", "createBaseColor3", "Color3", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "createBaseColor4", "Color4", "createBasePBAvatarShape", "PBAvatarShape", "encode", "message", "writer", "_m0", "Color3", "v", "decode", "input", "length", "reader", "end", "tag", "longToNumber", "tsProtoGlobalThis", "long", "long_default", "AvatarShapeSchema", "value", "builder", "writer", "PBAvatarShape", "buffer", "reader", "import_minimal", "BillboardMode", "createBasePBBillboard", "PBBillboard", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "BillboardSchema", "value", "builder", "writer", "PBBillboard", "buffer", "reader", "import_minimal", "createBasePBCameraMode", "PBCameraMode", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "CameraModeSchema", "value", "builder", "writer", "PBCameraMode", "buffer", "reader", "import_minimal", "createBasePBCameraModeArea", "PBCameraModeArea", "encode", "message", "writer", "_m0", "Vector3", "decode", "input", "length", "reader", "end", "tag", "CameraModeAreaSchema", "value", "builder", "writer", "PBCameraModeArea", "buffer", "reader", "import_minimal", "createBasePBEngineInfo", "PBEngineInfo", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "EngineInfoSchema", "value", "builder", "writer", "PBEngineInfo", "buffer", "reader", "import_minimal", "createBasePBGltfContainer", "PBGltfContainer", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "GltfContainerSchema", "value", "builder", "writer", "PBGltfContainer", "buffer", "reader", "import_minimal", "createBasePBGltfContainerLoadingState", "PBGltfContainerLoadingState", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "GltfContainerLoadingStateSchema", "value", "builder", "writer", "PBGltfContainerLoadingState", "buffer", "reader", "import_minimal", "import_minimal", "TextureWrapMode", "TextureFilterMode", "createBaseTexture", "Texture", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "createBaseAvatarTexture", "AvatarTexture", "createBaseVideoTexture", "VideoTexture", "createBaseTextureUnion", "TextureUnion", "MaterialTransparencyMode", "createBasePBMaterial", "PBMaterial", "encode", "message", "writer", "_m0", "PBMaterial_UnlitMaterial", "PBMaterial_PbrMaterial", "decode", "input", "length", "reader", "end", "tag", "createBasePBMaterial_UnlitMaterial", "TextureUnion", "Color4", "createBasePBMaterial_PbrMaterial", "Color3", "MaterialSchema", "value", "builder", "writer", "PBMaterial", "buffer", "reader", "import_minimal", "ColliderLayer", "createBasePBMeshCollider", "PBMeshCollider", "encode", "message", "writer", "_m0", "PBMeshCollider_BoxMesh", "PBMeshCollider_SphereMesh", "PBMeshCollider_CylinderMesh", "PBMeshCollider_PlaneMesh", "decode", "input", "length", "reader", "end", "tag", "createBasePBMeshCollider_BoxMesh", "_", "createBasePBMeshCollider_CylinderMesh", "createBasePBMeshCollider_PlaneMesh", "createBasePBMeshCollider_SphereMesh", "MeshColliderSchema", "value", "builder", "writer", "PBMeshCollider", "buffer", "reader", "import_minimal", "createBasePBMeshRenderer", "PBMeshRenderer", "encode", "message", "writer", "_m0", "PBMeshRenderer_BoxMesh", "PBMeshRenderer_SphereMesh", "PBMeshRenderer_CylinderMesh", "PBMeshRenderer_PlaneMesh", "decode", "input", "length", "reader", "end", "tag", "createBasePBMeshRenderer_BoxMesh", "v", "end2", "createBasePBMeshRenderer_CylinderMesh", "createBasePBMeshRenderer_PlaneMesh", "createBasePBMeshRenderer_SphereMesh", "_", "MeshRendererSchema", "value", "builder", "writer", "PBMeshRenderer", "buffer", "reader", "import_minimal", "NftFrameType", "createBasePBNftShape", "PBNftShape", "encode", "message", "writer", "_m0", "Color3", "decode", "input", "length", "reader", "end", "tag", "NftShapeSchema", "value", "builder", "writer", "PBNftShape", "buffer", "reader", "import_minimal", "createBasePBPointerEvents", "PBPointerEvents", "encode", "message", "writer", "_m0", "v", "PBPointerEvents_Entry", "decode", "input", "length", "reader", "end", "tag", "createBasePBPointerEvents_Info", "PBPointerEvents_Info", "createBasePBPointerEvents_Entry", "PointerEventsSchema", "value", "builder", "writer", "PBPointerEvents", "buffer", "reader", "import_minimal", "import_minimal", "createBaseRaycastHit", "RaycastHit", "encode", "message", "writer", "_m0", "Vector3", "decode", "input", "length", "reader", "end", "tag", "createBasePBPointerEventsResult", "PBPointerEventsResult", "encode", "message", "writer", "_m0", "RaycastHit", "decode", "input", "length", "reader", "end", "tag", "PointerEventsResultSchema", "value", "builder", "writer", "PBPointerEventsResult", "buffer", "reader", "import_minimal", "createBasePBPointerLock", "PBPointerLock", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "PointerLockSchema", "value", "builder", "writer", "PBPointerLock", "buffer", "reader", "import_minimal", "RaycastQueryType", "createBasePBRaycast", "PBRaycast", "encode", "message", "writer", "_m0", "Vector3", "decode", "input", "length", "reader", "end", "tag", "RaycastSchema", "value", "builder", "writer", "PBRaycast", "buffer", "reader", "import_minimal", "createBasePBRaycastResult", "PBRaycastResult", "encode", "message", "writer", "_m0", "Vector3", "v", "RaycastHit", "decode", "input", "length", "reader", "end", "tag", "RaycastResultSchema", "value", "builder", "writer", "PBRaycastResult", "buffer", "reader", "import_minimal", "createBasePBTextShape", "PBTextShape", "encode", "message", "writer", "_m0", "Color3", "Color4", "decode", "input", "length", "reader", "end", "tag", "TextShapeSchema", "value", "builder", "writer", "PBTextShape", "buffer", "reader", "import_minimal", "EasingFunction", "createBasePBTween", "PBTween", "encode", "message", "writer", "_m0", "Move", "Rotate", "Scale", "decode", "input", "length", "reader", "end", "tag", "createBaseMove", "Vector3", "createBaseRotate", "Quaternion", "createBaseScale", "TweenSchema", "value", "builder", "writer", "PBTween", "buffer", "reader", "import_minimal", "TweenLoop", "createBasePBTweenSequence", "PBTweenSequence", "encode", "message", "writer", "_m0", "v", "PBTween", "decode", "input", "length", "reader", "end", "tag", "TweenSequenceSchema", "value", "builder", "writer", "PBTweenSequence", "buffer", "reader", "import_minimal", "TweenStateStatus", "createBasePBTweenState", "PBTweenState", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "TweenStateSchema", "value", "builder", "writer", "PBTweenState", "buffer", "reader", "import_minimal", "import_minimal", "createBaseBorderRect", "BorderRect", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "createBaseRect", "Rect", "BackgroundTextureMode", "createBasePBUiBackground", "PBUiBackground", "encode", "message", "writer", "_m0", "Color4", "TextureUnion", "BorderRect", "v", "decode", "input", "length", "reader", "end", "tag", "end2", "UiBackgroundSchema", "value", "builder", "writer", "PBUiBackground", "buffer", "reader", "import_minimal", "createBasePBUiCanvasInformation", "PBUiCanvasInformation", "encode", "message", "writer", "_m0", "BorderRect", "decode", "input", "length", "reader", "end", "tag", "UiCanvasInformationSchema", "value", "builder", "writer", "PBUiCanvasInformation", "buffer", "reader", "import_minimal", "createBasePBUiDropdown", "PBUiDropdown", "encode", "message", "writer", "_m0", "v", "Color4", "decode", "input", "length", "reader", "end", "tag", "UiDropdownSchema", "value", "builder", "writer", "PBUiDropdown", "buffer", "reader", "import_minimal", "createBasePBUiDropdownResult", "PBUiDropdownResult", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "UiDropdownResultSchema", "value", "builder", "writer", "PBUiDropdownResult", "buffer", "reader", "import_minimal", "createBasePBUiInput", "PBUiInput", "encode", "message", "writer", "_m0", "Color4", "decode", "input", "length", "reader", "end", "tag", "UiInputSchema", "value", "builder", "writer", "PBUiInput", "buffer", "reader", "import_minimal", "createBasePBUiInputResult", "PBUiInputResult", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "UiInputResultSchema", "value", "builder", "writer", "PBUiInputResult", "buffer", "reader", "import_minimal", "createBasePBUiText", "PBUiText", "encode", "message", "writer", "_m0", "Color4", "decode", "input", "length", "reader", "end", "tag", "UiTextSchema", "value", "builder", "writer", "PBUiText", "buffer", "reader", "import_minimal", "YGPositionType", "YGAlign", "YGUnit", "YGFlexDirection", "YGWrap", "YGJustify", "YGOverflow", "YGDisplay", "YGEdge", "PointerFilterMode", "createBasePBUiTransform", "PBUiTransform", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "UiTransformSchema", "value", "builder", "writer", "PBUiTransform", "buffer", "reader", "import_minimal", "VideoState", "createBasePBVideoEvent", "PBVideoEvent", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "VideoEventSchema", "value", "builder", "writer", "PBVideoEvent", "buffer", "reader", "import_minimal", "createBasePBVideoPlayer", "PBVideoPlayer", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "VideoPlayerSchema", "value", "builder", "writer", "PBVideoPlayer", "buffer", "reader", "import_minimal", "createBasePBVisibilityComponent", "PBVisibilityComponent", "encode", "message", "writer", "_m0", "decode", "input", "length", "reader", "end", "tag", "VisibilityComponentSchema", "value", "builder", "writer", "PBVisibilityComponent", "buffer", "reader", "Animator", "engine", "AnimatorSchema", "AudioSource", "AudioSourceSchema", "AudioStream", "AudioStreamSchema", "AvatarAttach", "AvatarAttachSchema", "AvatarModifierArea", "AvatarModifierAreaSchema", "AvatarShape", "AvatarShapeSchema", "Billboard", "BillboardSchema", "CameraMode", "CameraModeSchema", "CameraModeArea", "CameraModeAreaSchema", "EngineInfo", "EngineInfoSchema", "GltfContainer", "GltfContainerSchema", "GltfContainerLoadingState", "GltfContainerLoadingStateSchema", "Material", "MaterialSchema", "MeshCollider", "MeshColliderSchema", "MeshRenderer", "MeshRendererSchema", "NftShape", "NftShapeSchema", "PointerEvents", "PointerEventsSchema", "PointerEventsResult", "PointerEventsResultSchema", "t", "PointerLock", "PointerLockSchema", "Raycast", "RaycastSchema", "RaycastResult", "RaycastResultSchema", "TextShape", "TextShapeSchema", "Tween", "TweenSchema", "TweenSequence", "TweenSequenceSchema", "TweenState", "TweenStateSchema", "UiBackground", "UiBackgroundSchema", "UiCanvasInformation", "UiCanvasInformationSchema", "UiDropdown", "UiDropdownSchema", "UiDropdownResult", "UiDropdownResultSchema", "UiInput", "UiInputSchema", "UiInputResult", "UiInputResultSchema", "UiText", "UiTextSchema", "UiTransform", "UiTransformSchema", "VideoEvent", "VideoEventSchema", "VideoPlayer", "VideoPlayerSchema", "VisibilityComponent", "VisibilityComponentSchema", "componentDefinitionByName", "defineAnimatorComponent", "engine", "theComponent", "Animator", "getClipAndAnimator", "entity", "clipName", "anim", "state", "item", "_", "animator", "shouldReset", "resetCursor", "defineMeshColliderComponent", "engine", "theComponent", "MeshCollider", "getCollisionMask", "layers", "item", "prev", "entity", "colliderLayers", "radiusBottom", "radiusTop", "TweenHelper", "move", "rotate", "scale", "defineTweenComponent", "engine", "Tween", "IArray", "type", "value", "builder", "item", "reader", "newArray", "length", "index", "Bool", "value", "builder", "reader", "Int64", "value", "builder", "reader", "Int32", "Int16", "Int8", "FlatString", "value", "builder", "reader", "EcsString", "validateMemberValuesAreNumbersAndInRangeInt32", "enumValue", "valueCount", "totalCount", "key", "validateMemberValuesAreStrings", "IntEnumReflectionType", "IntEnum", "enumObject", "defaultValue", "value", "builder", "Int32", "reader", "item", "StringEnumReflectionType", "StringEnum", "FlatString", "Float32", "value", "builder", "reader", "Float64", "Color3Schema", "value", "builder", "reader", "Color4Schema", "value", "builder", "reader", "EntitySchema", "value", "builder", "reader", "QuaternionSchema", "value", "builder", "reader", "Vector3Schema", "value", "builder", "reader", "IMap", "spec", "defaultValue", "specReflection", "currentKey", "value", "builder", "key", "reader", "newValue", "base", "IOptional", "spec", "value", "builder", "reader", "IOneOf", "specs", "specKeys", "keyToIndex", "dict", "key", "index", "specReflection", "currentKey", "$case", "value", "builder", "_value", "reader", "isSchemaType", "value", "types", "isOneOfJsonSchema", "type", "getUnknownSchema", "isCompoundType", "getTypeAndValue", "properties", "key", "valueKey", "typedMapValue", "propType", "primitiveSchemas", "Bool", "EcsString", "Float32", "Float64", "Int8", "Int16", "Int32", "Int64", "Vector3Schema", "QuaternionSchema", "Color3Schema", "Color4Schema", "EntitySchema", "jsonSchemaToSchema", "jsonSchema", "mapJsonSchema", "spec", "key", "IMap", "IOptional", "IArray", "enumJsonSchema", "IntEnum", "StringEnum", "oneOfJsonSchema", "IOneOf", "mutateValues", "value", "mutateFn", "properties", "typedValue", "type", "mapValue", "getTypeAndValue", "isCompoundType", "newValue", "items", "arrayValue", "i", "n", "Schemas", "Bool", "EcsString", "Float32", "Float64", "Int8", "Int16", "Int32", "Int64", "Vector3Schema", "QuaternionSchema", "Color3Schema", "Color4Schema", "EntitySchema", "IntEnum", "StringEnum", "IArray", "IMap", "IOptional", "IOneOf", "jsonSchemaToSchema", "mutateValues", "defineNameComponent", "engine", "Schemas", "Name_default", "defineSyncComponents", "engine", "Schemas", "SyncComponents_default", "defineNetworkEntityComponent", "engine", "Schemas", "NetworkEntity_default", "defineNetworkParentComponent", "engine", "Schemas", "NetworkParent_default", "TransformSchema", "value", "builder", "ptr", "reader", "defineTransformComponent", "engine", "transformDef", "entity", "val", "Transform", "engine", "defineTransformComponent", "Animator", "engine", "defineAnimatorComponent", "MeshCollider", "engine", "defineMeshColliderComponent", "Tween", "defineTweenComponent", "Name", "Name_default", "SyncComponents", "SyncComponents_default", "NetworkEntity", "NetworkEntity_default", "NetworkParent", "NetworkParent_default", "coreComponentMappings", "utf8", "CRC_TABLE", "_crc32", "buf", "previous", "crc", "n", "unsignedCRC32", "data", "prev", "MAX_STATIC_COMPONENT", "componentNumberFromName", "componentName", "coreComponentMappings", "bytes", "unsignedCRC32", "__DEV__", "checkNotThenable", "t", "error", "createVersionGSet", "lastVersion", "number", "version", "currentValue", "v", "MAX_U16", "MASK_UPPER_16_ON_32", "AMOUNT_VERSION_AVAILABLE", "MAX_ENTITY_NUMBER", "RESERVED_STATIC_ENTITIES", "RESERVED_LOCAL_ENTITIES", "EntityUtils", "fromEntityId", "entityId", "toEntityId", "entityNumber", "entityVersion", "EntityState", "EntityContainer", "entityCounter", "networkEntityCounter", "networkedEntitiesRange", "usedEntities", "toRemoveEntities", "removedEntities", "createVersionGSet", "localEntitiesAvailable", "setNetworkEntitiesRange", "reservedLocalEntities", "range", "generateNewEntity", "networked", "entity", "generateEntity", "usedNetworkSize", "$", "usedSize", "number", "version", "removeEntity", "updateRemovedEntity", "releaseRemovedEntities", "arr", "n", "v", "i", "updateUsedEntity", "getEntityState", "removedVersion", "utf8", "__classPrivateFieldGet", "receiver", "state", "kind", "f", "_ReadWriteByteBuffer_instances", "_ReadWriteByteBuffer_woAdd", "_ReadWriteByteBuffer_roAdd", "getNextSize", "currentSize", "intendedSize", "minNewSize", "defaultInitialCapacity", "ReadWriteByteBuffer", "buffer", "readingOffset", "writingOffset", "amount", "length", "value", "writeLength", "o", "byteLength", "offset", "newsize", "newBuffer", "oldOffset", "CrdtMessageType", "CRDT_MESSAGE_HEADER_LENGTH", "ProcessMessageResultType", "CrdtMessageProtocol", "validate", "buf", "rem", "CRDT_MESSAGE_HEADER_LENGTH", "messageLength", "readHeader", "getHeader", "currentOffset", "consumeMessage", "header", "DeleteComponent", "write", "entity", "componentId", "timestamp", "buf", "messageLength", "CRDT_MESSAGE_HEADER_LENGTH", "startMessageOffset", "CrdtMessageType", "read", "header", "CrdtMessageProtocol", "AppendValueOperation", "write", "entity", "timestamp", "componentId", "data", "buf", "startMessageOffset", "CRDT_MESSAGE_HEADER_LENGTH", "messageLength", "CrdtMessageType", "newLocal", "read", "header", "CrdtMessageProtocol", "DeleteEntity", "write", "entity", "buf", "CRDT_MESSAGE_HEADER_LENGTH", "CrdtMessageType", "read", "header", "CrdtMessageProtocol", "PutComponentOperation", "write", "entity", "timestamp", "componentId", "data", "buf", "startMessageOffset", "CRDT_MESSAGE_HEADER_LENGTH", "messageLength", "CrdtMessageType", "newLocal", "read", "header", "CrdtMessageProtocol", "PutNetworkComponentOperation", "write", "entity", "timestamp", "componentId", "networkId", "data", "buf", "startMessageOffset", "CRDT_MESSAGE_HEADER_LENGTH", "messageLength", "CrdtMessageType", "dataLength", "read", "header", "CrdtMessageProtocol", "DeleteComponentNetwork", "write", "entity", "componentId", "timestamp", "networkId", "buf", "messageLength", "CRDT_MESSAGE_HEADER_LENGTH", "startMessageOffset", "CrdtMessageType", "read", "header", "CrdtMessageProtocol", "DeleteEntityNetwork", "write", "entity", "networkId", "buf", "CRDT_MESSAGE_HEADER_LENGTH", "CrdtMessageType", "read", "header", "CrdtMessageProtocol", "isNetworkMessage", "message", "CrdtMessageType", "networkMessageToLocal", "localEntityId", "buffer", "destinationBuffer", "offset", "PutComponentOperation", "DeleteComponent", "DeleteEntity", "localMessageToNetwork", "network", "PutNetworkComponentOperation", "DeleteComponentNetwork", "DeleteEntityNetwork", "fixTransformParent", "transformValue", "parent", "transform", "ReadWriteByteBuffer", "TransformSchema", "newTransform", "crdtSceneSystem", "engine", "onProcessEntityComponentChange", "transports", "NetworkEntity", "NetworkParent", "Transform", "receivedMessages", "broadcastMessages", "parseChunkMessage", "transportId", "chunkMessage", "buffer", "ReadWriteByteBuffer", "header", "CrdtMessageProtocol", "offset", "message", "CrdtMessageType", "DeleteComponent", "DeleteComponentNetwork", "PutComponentOperation", "PutNetworkComponentOperation", "DeleteEntity", "DeleteEntityNetwork", "AppendValueOperation", "getMessages", "value", "findNetworkId", "msg", "entityId", "network", "receiveMessages", "messagesToProcess", "entitiesShouldBeCleaned", "isNetworkMessage", "entityState", "EntityState", "component", "fixTransformParent", "conflictMessage", "entity", "definition", "sendMessages", "entitiesDeletedThisTick", "crdtMessages", "t", "rawValue", "transportBuffer", "index", "transportIndex", "transport", "isRendererTransport", "isNetworkTransport", "transformNeedsFix", "parent", "transformData", "networkMessageToLocal", "networkData", "localMessageToNetwork", "addTransport", "id", "CrdtUtils", "SynchronizedEntityType", "dataCompare", "a", "b", "lengthDifference", "res", "i", "n", "deepReadonly", "val", "incrementTimestamp", "entity", "timestamps", "newTimestamp", "createDumpLwwFunctionFromCrdt", "componentId", "schema", "data", "buffer", "filterEntity", "timestamp", "it", "buf", "ReadWriteByteBuffer", "PutComponentOperation", "DeleteComponent", "createUpdateLwwFromCrdt", "crdtRuleForCurrentState", "message", "entityId", "currentTimestamp", "ProcessMessageResultType", "CrdtMessageType", "currentDataGreater", "writeBuffer", "dataCompare", "msg", "action", "createGetCrdtMessagesForLww", "dirtyIterator", "createComponentDefinitionFromSchema", "componentName", "markAsDirty", "component", "deepReadonly", "value", "usedValue", "SystemContainer", "systems", "sort", "a", "b", "add", "fn", "priority", "name", "systemName", "item", "remove", "selector", "index", "emptyReadonlySet", "freezeSet", "frozenError", "set", "sortByTimestamp", "a", "b", "createValueSetComponentDefinitionFromSchema", "componentName", "componentId", "schema", "options", "data", "dirtyIterator", "queuedCommands", "shouldSort", "row", "len", "gotUpdated", "entity", "frozenSet", "$", "append", "value", "usedValue", "timestamp", "__DEV__", "values", "rawValue", "buf", "ReadWriteByteBuffer", "CrdtMessageType", "component", "_body", "buffer", "filterEntity", "raw", "it", "AppendValueOperation", "genEntityTree", "entity", "entities", "_entity", "value", "getComponentEntityTree", "engine", "component", "removeNetworkEntityChildrens", "parent", "NetworkParent", "NetworkEntity", "network", "removeEntityWithChildren", "Transform", "ent", "InputCommands", "InputStateUpdateSystemPriority", "createInputSystem", "engine", "PointerEventsResult", "globalState", "findLastAction", "pointerEventType", "inputAction", "entity", "ascendingTimestampIterator", "command", "findCommandsByActionDescending", "buttonStateUpdateSystem", "maxTimestamp", "commands", "arrayCommands", "i", "prevCommand", "timestampIsCurrentFrame", "timestamp", "getClick", "findClick", "input", "cmd", "down", "up", "it", "getInputCommandFromEntity", "findInputCommand", "getInputCommand", "isClicked", "isTriggered", "isPressed", "ComponentType", "preEngine", "entityContainer", "EntityContainer", "componentsDefinition", "systems", "SystemContainer", "sealed", "addSystem", "fn", "priority", "name", "removeSystem", "selector", "addEntity", "removeEntity", "entity", "component", "NetworkEntity", "removeEntityWithChildren", "defineComponentFromSchema", "getEntitiesWith", "defineComponent", "registerComponentDefinition", "componentName", "componentId", "componentNumberFromName", "schema", "prev", "newComponent", "createComponentDefinitionFromSchema", "defineValueSetComponentFromSchema", "options", "createValueSetComponentDefinitionFromSchema", "mapSpec", "constructorDefault", "schemaSpec", "Schemas", "def", "val", "getComponent", "componentIdOrName", "getComponentOrNull", "components", "groupComp", "getComponentDefGroup", "c", "getEntityOrNullByName", "value", "LabelComponent", "Name", "args", "firstComponentDef", "componentDefinitions", "matches", "componentDef", "getSystems", "componentsIter", "removeComponentDefinition", "Transform", "seal", "Engine", "partialEngine", "crdtSystem", "crdtSceneSystem", "update", "dt", "system", "ret", "checkNotThenable", "deletedEntites", "getAndClean", "value", "messagesToProcess", "createTaskSystem", "engine", "tasks", "runTask", "task", "e", "executeTasks", "createTweenSystem", "engine", "Tween", "TweenState", "TweenSequence", "cache", "isCompleted", "entity", "tweenState", "tween", "tweenCache", "tweenChanged", "currentTween", "prevTween", "currentBuff", "ReadWriteByteBuffer", "dataCompare", "restartTweens", "restart", "buffer", "tweenSequence", "sequence", "nextTweenSequence", "otherTweens", "mutableTweenHelper", "backwardsTween", "engine", "Engine", "inputSystem", "createInputSystem", "tweenSystem", "createTweenSystem", "engine", "executeTask", "createTaskSystem", "AudioSource", "engine", "AvatarAttach", "engine", "EngineInfo", "engine", "GltfContainer", "GltfContainerLoadingState", "PointerEvents", "engine", "PointerEventsResult", "CameraType", "InputAction", "PointerEventType", "LoadingState", "TextAlignMode", "Font", "getCompositeRootComponent", "engine", "component", "Schemas", "currentWorkingDir", "normalizeStringPosix", "path", "allowAboveRoot", "res", "lastSegmentLength", "lastSlash", "dots", "code", "i", "lastSlashIndex", "resolve", "args", "resolvedPath", "resolvedAbsolute", "cwd", "dirname", "hasRoot", "end", "matchedSlash", "resolveComposite", "EntityMappingMode", "getComponentValue", "componentDefinition", "component", "ReadWriteByteBuffer", "getComponentDefinition", "engine", "existingComponentDefinition", "componentDefinitionByName", "Schemas", "getEntityMapping", "compositeEntity", "mappedEntities", "entityMapping", "existingEntity", "entity", "newEntity", "instanceComposite", "compositeResource", "compositeProvider", "options", "rootEntity", "optionalAlreadyRequestedSrc", "alreadyRequestedSrc", "compositeDirectoryPath", "dirname", "resolve", "TransformComponentNumber", "componentNumberFromName", "CompositeRootComponent", "getCompositeRootComponent", "getCompositeEntity", "compositeRootEntity", "childrenComposite", "item", "childCompositeEntity", "compositeRawData", "childComposite", "childCompositePath", "resolveComposite", "childCompositeResource", "targetEntity", "compositeComponentValue", "componentValueDeserialized", "componentValue", "transform", "value", "valueType", "composite", "entitySource", "import_minimal", "import_minimal", "NullValue", "nullValueFromJSON", "object", "tsProtoGlobalThis", "nullValueToJSON", "createBaseStruct", "Struct", "encode", "message", "writer", "_m0", "value", "key", "Struct_FieldsEntry", "decode", "input", "length", "reader", "end", "tag", "entry1", "fromJSON", "isObject", "acc", "toJSON", "obj", "v", "k", "wrap", "struct", "unwrap", "createBaseStruct_FieldsEntry", "Value", "isSet", "createBaseValue", "ListValue", "result", "createBaseListValue", "e", "array", "createBaseComponentData", "ComponentData", "encode", "message", "writer", "_m0", "Value", "decode", "input", "length", "reader", "end", "tag", "fromJSON", "object", "isSet", "bytesFromBase64", "toJSON", "obj", "base64FromBytes", "createBaseCompositeComponent", "CompositeComponent", "value", "key", "CompositeComponent_DataEntry", "entry3", "isObject", "acc", "v", "k", "createBaseCompositeComponent_DataEntry", "createBaseCompositeDefinition", "CompositeDefinition", "e", "tsProtoGlobalThis", "b64", "bin", "arr", "i", "byte", "Composite", "fromJson", "object", "CompositeDefinition", "fromBinary", "buffer", "toJson", "composite", "toBinary", "instance", "engine", "compositeData", "compositeProvider", "options", "instanceComposite", "resolveAndNormalizePath", "src", "cwd", "resolveComposite", "Transform", "engine", "Animator", "MeshCollider", "engine", "Name", "SyncComponents", "engine", "NetworkEntity", "NetworkParent", "ToGammaSpace", "ToLinearSpace", "Epsilon", "DEG2RAD", "RAD2DEG", "Scalar", "withinEpsilon", "a", "b", "epsilon", "num", "toHex", "i", "str", "sign", "value", "_value", "clamp", "min", "max", "log2", "repeat", "length", "normalize", "denormalize", "normalized", "deltaAngle", "current", "target", "pingPong", "tx", "t", "smoothStep", "from", "to", "moveTowards", "maxDelta", "result", "moveTowardsAngle", "lerp", "start", "end", "amount", "lerpAngle", "inverseLerp", "hermite", "value1", "tangent1", "value2", "tangent2", "squared", "cubed", "part1", "part2", "part3", "part4", "randomRange", "rangeToPercent", "percentToRange", "percent", "normalizeRadians", "angle", "Vector3", "isNonUniform", "vector", "absX", "absY", "absZ", "create", "x", "y", "z", "add", "vector1", "vector2", "addToRef", "result", "subtract", "subtractToRef", "subtractFromFloatsToRef", "negate", "value", "copyFrom", "source", "dest", "copyFromFloats", "clone", "getClipFactor", "vector0", "axis", "size", "d0", "dot", "d1", "getAngleBetweenVectors", "normal", "v0", "normalize", "v1", "v0v1dot", "n", "crossToRef", "fromArray", "array", "offset", "fromFloatArray", "fromArrayToRef", "fromFloatArrayToRef", "length", "lengthSquared", "scaleToRef", "scale", "normalizeFromLength", "len", "normalizeFromLengthToRef", "normalizeToRef", "left", "right", "applyMatrix4", "matrix", "applyMatrix4ToRef", "m", "w", "rotate", "q", "rotateToRef", "qx", "qy", "qz", "qw", "ix", "iy", "iz", "iw", "lerp", "start", "end", "amount", "lerpToRef", "cross", "Zero", "transformCoordinates", "transformation", "transformCoordinatesToRef", "transformCoordinatesFromFloatsToRef", "rx", "ry", "rz", "rw", "transformNormal", "transformNormalToRef", "transformNormalFromFloatsToRef", "catmullRom", "value1", "value2", "value3", "value4", "squared", "cubed", "clamp", "min", "max", "v", "clampToRef", "hermite", "tangent1", "tangent2", "part1", "part2", "part3", "part4", "minimize", "minimizeInPlaceFromFloatsToRef", "maximize", "maximizeInPlaceFromFloatsToRef", "distance", "distanceSquared", "center", "rotationFromAxis", "axis1", "axis2", "axis3", "rotation", "rotationFromAxisToRef", "quat", "Quaternion", "toString", "getHashCode", "hash", "equals", "equalsWithEpsilon", "epsilon", "Epsilon", "Scalar", "equalsToFloats", "multiply", "multiplyToRef", "multiplyByFloatsToRef", "multiplyByFloats", "divide", "divideToRef", "floor", "fract", "One", "Up", "Down", "Forward", "Backward", "Right", "Left", "Random", "Plane", "create", "a", "b", "c", "d", "Vector3", "fromArray", "array", "fromPoints", "_point1", "_point2", "_point3", "romPositionAndNormal", "origin", "normal", "result", "signedDistanceToPlaneFromPositionAndNormal", "point", "asArray", "plane", "clone", "getHashCode", "_plane", "normalize", "norm", "magnitude", "transform", "transformation", "transposedMatrix", "Matrix", "m", "x", "y", "z", "normalX", "normalY", "normalZ", "finalD", "dotCoordinate", "copyFromPoints", "point1", "point2", "point3", "x1", "y1", "z1", "x2", "y2", "z2", "yz", "xz", "xy", "pyth", "invPyth", "isFrontFacingTo", "direction", "epsilon", "signedDistanceTo", "Matrix", "m", "self", "_updateFlagSeed", "_identityReadonly", "IdentityReadonly", "create", "newMatrix", "_updateIdentityStatus", "fromArray", "array", "offset", "result", "fromArrayToRef", "index", "_markAsUpdated", "fromFloatArrayToRefScaled", "scale", "fromValuesToRef", "initialM11", "initialM12", "initialM13", "initialM14", "initialM21", "initialM22", "initialM23", "initialM24", "initialM31", "initialM32", "initialM33", "initialM34", "initialM41", "initialM42", "initialM43", "initialM44", "fromValues", "compose", "rotation", "translation", "composeToRef", "tmpMatrix", "scalingToRef", "fromQuaternionToRef", "multiplyToRef", "setTranslation", "Identity", "identity", "IdentityToRef", "Zero", "zero", "RotationX", "angle", "rotationXToRef", "s", "c", "rotationY", "rotationYToRef", "rotationZ", "rotationZToRef", "rotationAxis", "axis", "rotationAxisToRef", "_axis", "c1", "Vector3", "rotationYawPitchRoll", "yaw", "pitch", "roll", "rotationYawPitchRollToRef", "quaternionResult", "Quaternion", "scaling", "x", "y", "z", "translationToRef", "lerp", "startValue", "endValue", "gradient", "lerpToRef", "decomposeLerp", "decomposeLerpToRef", "startScale", "startRotation", "startTranslation", "decompose", "endScale", "endRotation", "endTranslation", "resultScale", "resultRotation", "resultTranslation", "LookAtLH", "eye", "target", "up", "lookAtLHToRef", "xAxis", "yAxis", "zAxis", "xSquareLength", "ex", "ey", "ez", "lookAtRH", "lookAtRHToRef", "orthoLH", "width", "height", "znear", "zfar", "matrix", "orthoLHToRef", "n", "f", "a", "b", "d", "OrthoOffCenterLH", "left", "right", "bottom", "top", "orthoOffCenterLHToRef", "i0", "i1", "orthoOffCenterRH", "orthoOffCenterRHToRef", "perspectiveLH", "perspectiveFovLH", "fov", "aspect", "perspectiveFovLHToRef", "isVerticalFovFixed", "t", "PerspectiveFovRH", "perspectiveFovRHToRef", "perspectiveFovWebVRToRef", "rightHanded", "rightHandedFactor", "upTan", "downTan", "leftTan", "rightTan", "xScale", "yScale", "GetAsMatrix2x2", "GetAsMatrix3x3", "transpose", "transposeToRef", "rm", "mm", "reflection", "plane", "reflectionToRef", "_plane", "Plane", "temp", "temp2", "temp3", "fromXYZAxesToRef", "xaxis", "yaxis", "zaxis", "quat", "xx", "yy", "zz", "xy", "zw", "zx", "yw", "yz", "xw", "isIdentityUpdate", "isIdentityAs3x2Update", "determinant", "m00", "m01", "m02", "m03", "m10", "m11", "m12", "m13", "m20", "m21", "m22", "m23", "m30", "m31", "m32", "m33", "det_22_33", "det_21_33", "det_21_32", "det_20_33", "det_20_32", "det_20_31", "cofact_00", "cofact_01", "cofact_02", "cofact_03", "toArray", "asArray", "reset", "add", "other", "addToRef", "addToSelf", "invert", "source", "invertToRef", "copy", "det", "detInv", "det_12_33", "det_11_33", "det_11_32", "det_10_33", "det_10_32", "det_10_31", "det_12_23", "det_11_23", "det_11_22", "det_10_23", "det_10_22", "det_10_21", "cofact_10", "cofact_11", "cofact_12", "cofact_13", "cofact_20", "cofact_21", "cofact_22", "cofact_23", "cofact_30", "cofact_31", "cofact_32", "cofact_33", "addAtIndex", "value", "multiplyAtIndex", "setTranslationFromFloats", "vector3", "getTranslation", "getTranslationToRef", "removeRotationAndScaling", "multiply", "from", "dest", "copyToArray", "arrayDest", "offsetDest", "multiplyToArray", "otherM", "tm0", "tm1", "tm2", "tm3", "tm4", "tm5", "tm6", "tm7", "tm8", "tm9", "tm10", "tm11", "tm12", "tm13", "tm14", "tm15", "om0", "om1", "om2", "om3", "om4", "om5", "om6", "om7", "om8", "om9", "om10", "om11", "om12", "om13", "om14", "om15", "equals", "om", "clone", "getHashCode", "hash", "i", "usedScale", "sx", "sy", "sz", "setRowFromFloats", "w", "scaleToRef", "scaleAndAddToRef", "normalMatrixToRef", "ref", "tmp", "getRotationMatrix", "getRotationMatrixToRef", "toggleModelMatrixHandInPlace", "toggleProjectionMatrixHandInPlace", "isIdentity", "isIdentityDirty", "isIdentity3x2", "isIdentity3x2Dirty", "Quaternion", "create", "x", "y", "z", "w", "add", "q1", "q2", "fromRotationYawPitchRoll", "yaw", "pitch", "roll", "halfPitch", "halfYaw", "halfRoll", "c1", "c2", "c3", "s1", "s2", "s3", "fromEulerDegrees", "DEG2RAD", "length", "q", "lengthSquared", "dot", "left", "right", "angle", "quat1", "quat2", "dotVal", "RAD2DEG", "rotateTowards", "from", "to", "maxDegreesDelta", "num", "t", "slerp", "lookRotation", "forward", "up", "forwardNew", "Vector3", "upNew", "m00", "m01", "m02", "m10", "m11", "m12", "m20", "m21", "m22", "num8", "quaternion", "num7", "num4", "num6", "num3", "num5", "num2", "normalize", "qLength", "fromToRotation", "v0", "v1", "a", "Identity", "toEulerAngles", "out", "unit", "test", "Scalar", "fromRotationYawPitchRollToRef", "result", "fromRotationMatrixToRef", "matrix", "data", "m13", "m23", "m31", "m32", "m33", "trace", "s", "amount", "slerpToRef", "flag", "multiply", "self", "multiplyToRef", "fromAngleAxis", "degrees", "axis", "radians", "a2", "fromAxisToRotationQuaternion", "axis1", "axis2", "axis3", "quat", "fromAxisToRotationQuaternionToRef", "ref", "rotMat", "Matrix", "Zero", "fromLookAt", "position", "target", "worldUp", "fromLookAtToRef", "m", "Color4", "create", "r", "g", "b", "a", "fromHexString", "hex", "aStr", "lerp", "left", "right", "amount", "result", "lerpToRef", "Red", "Green", "Blue", "Black", "White", "Purple", "Magenta", "Yellow", "Gray", "Teal", "Clear", "fromColor3", "color3", "alpha", "fromArray", "array", "offset", "fromInts", "checkColors4", "colors", "count", "colors4", "index", "newIndex", "addToRef", "ref", "toArray", "value", "add", "ret", "subtract", "subtractToRef", "scale", "scaleToRef", "scaleAndAddToRef", "clampToRef", "min", "max", "Scalar", "multiply", "color", "multiplyToRef", "toString", "getHashCode", "hash", "clone", "copyFrom", "source", "dest", "copyFromFloats", "set", "toHexString", "intR", "intG", "intB", "intA", "toLinearSpace", "convertedColor", "toLinearSpaceToRef", "ToLinearSpace", "toGammaSpace", "toGammaSpaceToRef", "ToGammaSpace", "Color3", "create", "r", "g", "b", "fromHexString", "hex", "fromInts", "fromArray", "array", "offset", "lerp", "start", "end", "amount", "result", "lerpToRef", "left", "right", "Red", "Green", "Blue", "Black", "White", "Purple", "Magenta", "Yellow", "Gray", "Teal", "Random", "toString", "value", "getHashCode", "hash", "toArray", "index", "toColor4", "alpha", "Color4", "asArray", "toLuminance", "multiply", "otherColor", "multiplyToRef", "equals", "equalsFloats", "scale", "scaleToRef", "scaleAndAddToRef", "clampToRef", "min", "max", "Scalar", "clamp", "add", "addToRef", "subtract", "subtractToRef", "clone", "copyFrom", "source", "dest", "set", "toHexString", "intR", "intG", "intB", "toLinearSpace", "convertedColor", "toLinearSpaceToRef", "ToLinearSpace", "toGammaSpace", "toGammaSpaceToRef", "ToGammaSpace", "BeerType", "TAP_DATA", "Vector3", "getTapData", "tapBeerType", "BeerGlass", "engine", "Schemas", "PickedUp", "TapComponent", "TapBase", "import_CommunicationsController", "syncFilter", "message", "componentId", "PointerEventsResult", "GltfContainerLoadingState", "entityId", "EntityUtils", "RESERVED_STATIC_ENTITIES", "NetworkEntity", "engine", "network", "CrdtMessageType", "SyncComponents", "sync", "NetworkParent", "engineToCrdt", "engine", "crdtBuffer", "ReadWriteByteBuffer", "networkBuffer", "SyncComponents", "NetworkEntity", "syncEntities", "$", "itComponentDefinition", "entity", "header", "CrdtMessageProtocol", "CrdtMessageType", "message", "PutComponentOperation", "networkEntity", "PutNetworkComponentOperation", "readMessage", "buf", "header", "CrdtMessageProtocol", "CrdtMessageType", "PutComponentOperation", "PutNetworkComponentOperation", "DeleteComponent", "DeleteComponentNetwork", "AppendValueOperation", "DeleteEntity", "DeleteEntityNetwork", "serializeCrdtMessages", "prefix", "data", "engine", "buffer", "ReadWriteByteBuffer", "message", "readMessage", "ent", "preface", "CrdtMessageType", "componentId", "timestamp", "c", "CommsMessage", "BinaryMessageBus", "send", "mapping", "message", "callback", "value", "craftMessage", "messages", "commsMsg", "decodeMessage", "sender", "messageType", "data", "fn", "payload", "msg", "offset", "r", "view", "senderLength", "decodeString", "e", "buffer", "ReadWriteByteBuffer", "import_UserIdentity", "definePlayersInScene", "engine", "Schemas", "stateInitialized", "setInitialized", "stateInitialized", "INITIAL_CRDT_RENDERER_MESSAGES_SENT", "fetchProfile", "myProfile", "data", "userId", "networkId", "componentNumberFromName", "syncTransportIsReady", "engine", "EngineInfo", "INITIAL_CRDT_RENDERER_MESSAGES_SENT", "engineInfo", "stateInitializedChecker", "_profile", "_syncEntity", "enterScene", "setInitialized", "entityUtils", "engine", "profile", "NetworkEntity", "NetworkParent", "Transform", "SyncComponents", "syncEntity", "entityId", "componentIds", "entityEnumId", "networkValue", "_", "network", "getChildren", "parent", "entity", "getFirstChild", "getParent", "child", "parentEntity", "removeParent", "addSyncTransport", "engine", "definePlayersInScene", "myProfile", "fetchProfile", "entityDefinitions", "entityUtils", "pendingMessageBusMessagesToSend", "binaryMessageBus", "BinaryMessageBus", "message", "getMessagesToSend", "messages", "transport", "syncFilter", "syncTransportIsReady", "serializeCrdtMessages", "CommsMessage", "response", "stateInitializedChecker", "value", "stateInitialized", "setInitialized", "engineToCrdt", "getChildren", "syncEntity", "parentEntity", "getParent", "myProfile", "removeParent", "getFirstChild", "addSyncTransport", "engine", "createBeerGlass", "model", "position", "id", "glassEntity", "engine", "GltfContainer", "ColliderLayer", "Transform", "Animator", "BeerGlass", "PointerEvents", "PointerEventType", "InputAction", "syncEntity", "AudioSource", "createTap", "tapBeerType", "dispenseEntity", "tapEntity", "tapData", "getTapData", "TapComponent", "tapColliderPosition", "Vector3", "colliderParentEntity", "TapBase", "parentEntity", "colliderEntity", "Quaternion", "MeshCollider", "playSound", "audio", "loop", "entity", "import_UserIdentity", "getPlayerPosition", "Transform", "engine", "Vector3", "currentPlayerId", "executeTask", "user", "pickingGlassSystem", "entity", "pickedUp", "engine", "PickedUp", "tryToDropCommand", "inputSystem", "InputAction", "PointerEventType", "pickedUpChild", "getChildren", "currentPlayerId", "hitPosition", "getPlayerPosition", "hitEntity", "hitParentEntity", "getParent", "drop", "TapBase", "Transform", "parentEntity", "diff", "Vector3", "removeParent", "playSound", "glass", "BeerGlass", "tryToDrinkCommand", "Animator", "parentBeer", "AvatarAttach", "AvatarAnchorPointType", "Quaternion", "syncEntity", "getBeerBehindTap", "beerType", "glassEntity", "engine", "BeerGlass", "glassParent", "getParent", "TapBase", "tapPumpSystem", "dt", "entity", "tapReadonly", "TapComponent", "Scalar", "Animator", "playSound", "getTapData", "tap", "glass", "inputSystem", "InputAction", "PointerEventType", "main", "tables", "engine", "Transform", "Vector3", "GltfContainer", "PointerEvents", "PointerEventType", "floor", "syncEntity", "dispenserEntity", "createTap", "beerGlassModel", "createBeerGlass", "pickingGlassSystem", "tapPumpSystem", "import_EngineApi", "createRendererTransport", "engineApi", "sendToRenderer", "message", "response", "rendererTransport", "byteArray", "error", "MAX_STATIC_COMPONENT", "ObserverEventState", "mask", "skipNextObservers", "target", "currentTarget", "Observer", "callback", "scope", "Observable", "_Observable", "onObserverAdded", "insertFirst", "unregisterOnFirstCall", "observer", "index", "eventData", "state", "obs", "p", "lastReturnedValue", "result", "import_EngineApi", "subscribeFunction", "createSubscriber", "eventName", "onEnterSceneObservable", "Observable", "onLeaveSceneObservable", "Observable", "createSubscriber", "onSceneReadyObservable", "Observable", "createSubscriber", "onPlayerExpressionObservable", "onVideoEvent", "onProfileChanged", "onPlayerConnectedObservable", "onPlayerDisconnectedObservable", "onRealmChangedObservable", "onPlayerClickedObservable", "onCommsMessage", "pollEvents", "sendBatch", "events", "e", "data", "onEnterSceneObservable", "onLeaveSceneObservable", "onSceneReadyObservable", "onPlayerExpressionObservable", "videoData", "onVideoEvent", "onProfileChanged", "onPlayerConnectedObservable", "onPlayerDisconnectedObservable", "onRealmChangedObservable", "onPlayerClickedObservable", "onCommsMessage", "compositeFromLoader", "composites", "compositeProvider", "src", "_currentPath", "fromLoader", "compositeFromLoader", "composite", "Composite", "err", "item", "rendererTransport", "createRendererTransport", "engine", "onUpdate", "deltaTime", "pollEvents", "onStart", "response", "mainComposite", "compositeProvider", "Composite", "err", "byteArray", "main", "_INTERNAL_startup_system", "maybePromise", "engine"] + "sources": ["../node_modules/@protobufjs/aspromise/index.js", "../node_modules/@protobufjs/base64/index.js", "../node_modules/@protobufjs/eventemitter/index.js", "../node_modules/@protobufjs/float/index.js", "../node_modules/@protobufjs/inquire/index.js", "../node_modules/@protobufjs/utf8/index.js", "../node_modules/@protobufjs/pool/index.js", "../node_modules/protobufjs/src/util/longbits.js", "../node_modules/protobufjs/src/util/minimal.js", "../node_modules/protobufjs/src/writer.js", "../node_modules/protobufjs/src/writer_buffer.js", "../node_modules/protobufjs/src/reader.js", "../node_modules/protobufjs/src/reader_buffer.js", "../node_modules/protobufjs/src/rpc/service.js", "../node_modules/protobufjs/src/rpc.js", "../node_modules/protobufjs/src/roots.js", "../node_modules/protobufjs/src/index-minimal.js", "../node_modules/protobufjs/minimal.js", "../node_modules/react/cjs/react.production.min.js", "../node_modules/react/index.js", "../node_modules/scheduler/cjs/scheduler.production.min.js", "../node_modules/scheduler/index.js", "../node_modules/react-reconciler/cjs/react-reconciler.production.min.js", "../node_modules/react-reconciler/index.js", "../src/index.ts.entry-point.ts", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/animator.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/Animator.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/audio_source.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/AudioSource.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/audio_stream.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/AudioStream.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/avatar_attach.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/AvatarAttach.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/avatar_modifier_area.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/common/vectors.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/AvatarModifierArea.gen.js", "../node_modules/long/index.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/avatar_shape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/common/colors.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/AvatarShape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/billboard.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/Billboard.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/camera_mode.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/CameraMode.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/camera_mode_area.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/CameraModeArea.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/engine_info.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/EngineInfo.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/gltf_container.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/GltfContainer.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/gltf_container_loading_state.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/GltfContainerLoadingState.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/material.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/common/texture.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/Material.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/mesh_collider.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/MeshCollider.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/mesh_renderer.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/MeshRenderer.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/nft_shape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/NftShape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/pointer_events.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/PointerEvents.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/pointer_events_result.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/common/raycast_hit.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/PointerEventsResult.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/pointer_lock.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/PointerLock.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/raycast.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/Raycast.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/raycast_result.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/RaycastResult.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/text_shape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/TextShape.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/tween.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/Tween.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/tween_sequence.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/TweenSequence.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/tween_state.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/TweenState.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_background.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/common/border_rect.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiBackground.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_canvas_information.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiCanvasInformation.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_dropdown.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiDropdown.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_dropdown_result.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiDropdownResult.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_input.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiInput.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_input_result.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiInputResult.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_text.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiText.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/ui_transform.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/UiTransform.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/video_event.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/VideoEvent.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/video_player.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/VideoPlayer.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/visibility_component.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/VisibilityComponent.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/index.gen.js", "../node_modules/@dcl/ecs/dist/components/extended/Animator.js", "../node_modules/@dcl/ecs/dist/components/extended/Material.js", "../node_modules/@dcl/ecs/dist/components/extended/MeshCollider.js", "../node_modules/@dcl/ecs/dist/components/extended/MeshRenderer.js", "../node_modules/@dcl/ecs/dist/components/extended/Tween.js", "../node_modules/@dcl/ecs/dist/schemas/Array.js", "../node_modules/@dcl/ecs/dist/schemas/basic/Boolean.js", "../node_modules/@dcl/ecs/dist/schemas/basic/Integer.js", "../node_modules/@dcl/ecs/dist/schemas/basic/String.js", "../node_modules/@dcl/ecs/dist/schemas/basic/Enum.js", "../node_modules/@dcl/ecs/dist/schemas/basic/Float.js", "../node_modules/@dcl/ecs/dist/schemas/custom/Color3.js", "../node_modules/@dcl/ecs/dist/schemas/custom/Color4.js", "../node_modules/@dcl/ecs/dist/schemas/custom/Entity.js", "../node_modules/@dcl/ecs/dist/schemas/custom/Quaternion.js", "../node_modules/@dcl/ecs/dist/schemas/custom/Vector3.js", "../node_modules/@dcl/ecs/dist/schemas/Map.js", "../node_modules/@dcl/ecs/dist/schemas/Optional.js", "../node_modules/@dcl/ecs/dist/schemas/OneOf.js", "../node_modules/@dcl/ecs/dist/schemas/buildSchema/utils.js", "../node_modules/@dcl/ecs/dist/schemas/buildSchema/index.js", "../node_modules/@dcl/ecs/dist/schemas/index.js", "../node_modules/@dcl/ecs/dist/components/manual/Name.js", "../node_modules/@dcl/ecs/dist/components/manual/SyncComponents.js", "../node_modules/@dcl/ecs/dist/components/manual/NetworkEntity.js", "../node_modules/@dcl/ecs/dist/components/manual/NetworkParent.js", "../node_modules/@dcl/ecs/dist/components/manual/Transform.js", "../node_modules/@dcl/ecs/dist/components/index.js", "../node_modules/@dcl/ecs/dist/components/generated/component-names.gen.js", "../node_modules/@dcl/ecs/dist/components/component-number.js", "../node_modules/@dcl/ecs/dist/runtime/crc.js", "../node_modules/@dcl/ecs/dist/runtime/invariant.js", "../node_modules/@dcl/ecs/dist/systems/crdt/gset.js", "../node_modules/@dcl/ecs/dist/engine/entity.js", "../node_modules/@dcl/ecs/dist/serialization/ByteBuffer/index.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/types.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/crdtMessageProtocol.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/deleteComponent.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/appendValue.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/deleteEntity.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/putComponent.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/network/putComponentNetwork.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/network/deleteComponentNetwork.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/network/deleteEntityNetwork.js", "../node_modules/@dcl/ecs/dist/serialization/crdt/network/utils.js", "../node_modules/@dcl/ecs/dist/systems/crdt/index.js", "../node_modules/@dcl/ecs/dist/systems/crdt/utils.js", "../node_modules/@dcl/ecs/dist/engine/readonly.js", "../node_modules/@dcl/ecs/dist/engine/lww-element-set-component-definition.js", "../node_modules/@dcl/ecs/dist/engine/systems.js", "../node_modules/@dcl/ecs/dist/engine/grow-only-value-set-component-definition.js", "../node_modules/@dcl/ecs/dist/runtime/helpers/tree.js", "../node_modules/@dcl/ecs/dist/engine/input.js", "../node_modules/@dcl/ecs/dist/engine/component.js", "../node_modules/@dcl/ecs/dist/engine/index.js", "../node_modules/@dcl/ecs/dist/systems/async-task.js", "../node_modules/@dcl/ecs/dist/systems/events.js", "../node_modules/@dcl/ecs/dist/systems/tween.js", "../node_modules/@dcl/ecs/dist/runtime/initialization/index.js", "../node_modules/@dcl/ecs/dist/components/generated/global.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/common/camera_type.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/common/input_action.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/common/loading_state.gen.js", "../node_modules/@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/common/texts.gen.js", "../node_modules/@dcl/ecs/dist/composite/components.js", "../node_modules/@dcl/ecs/dist/composite/path.js", "../node_modules/@dcl/ecs/dist/composite/instance.js", "../node_modules/@dcl/ecs/dist/composite/proto/gen/composite.gen.js", "../node_modules/@dcl/ecs/dist/composite/proto/gen/google/protobuf/struct.gen.js", "../node_modules/@dcl/ecs/dist/composite/index.js", "../node_modules/@dcl/ecs/dist/index.js", "../node_modules/@dcl/ecs-math/dist/types.js", "../node_modules/@dcl/ecs-math/dist/Scalar.js", "../node_modules/@dcl/ecs-math/dist/Vector3.js", "../node_modules/@dcl/ecs-math/dist/Plane.js", "../node_modules/@dcl/ecs-math/dist/Matrix.js", "../node_modules/@dcl/ecs-math/dist/Quaternion.js", "../node_modules/@dcl/ecs-math/dist/Color4.js", "../node_modules/@dcl/ecs-math/dist/Color3.js", "../src/definitions.ts", "../src/modules/helpers.ts", "../node_modules/@dcl/sdk/src/network/index.ts", "../node_modules/@dcl/sdk/src/network/filter.ts", "../node_modules/@dcl/sdk/src/network/state.ts", "../node_modules/@dcl/sdk/src/network/binary-message-bus.ts", "../node_modules/@dcl/sdk/src/network/utils.ts", "../node_modules/@dcl/sdk/src/network/entities.ts", "../node_modules/@dcl/sdk/src/network/message-bus-sync.ts", "../node_modules/@dcl-sdk/utils/src/math.ts", "../node_modules/@dcl-sdk/utils/src/priority.ts", "../node_modules/@dcl-sdk/utils/src/timer.ts", "../node_modules/@dcl-sdk/utils/src/toggle.ts", "../node_modules/@dcl-sdk/utils/src/tween.ts", "../node_modules/@dcl-sdk/utils/src/perpetualMotion.ts", "../node_modules/@dcl-sdk/utils/src/path.ts", "../node_modules/@dcl-sdk/utils/src/trigger.ts", "../node_modules/@dcl-sdk/utils/src/action.ts", "../src/modules/cuttingBoard.ts", "../src/modules/progressBars.ts", "../src/modules/speechBubble.ts", "../src/modules/customers.ts", "../src/modules/pot.ts", "../src/modules/pickAndDrop.ts", "../src/modules/factory.ts", "../src/modules/tap.ts", "../src/ui.tsx", "../node_modules/@dcl/react-ecs/dist/react-ecs.js", "../node_modules/@dcl/react-ecs/dist/reconciler/index.js", "../node_modules/@dcl/react-ecs/dist/components/Label/utils.js", "../node_modules/@dcl/react-ecs/dist/components/uiBackground/utils.js", "../node_modules/@dcl/react-ecs/dist/components/uiBackground/index.js", "../node_modules/@dcl/react-ecs/dist/components/uiTransform/utils.js", "../node_modules/@dcl/react-ecs/dist/components/uiTransform/index.js", "../node_modules/@dcl/react-ecs/dist/components/utils.js", "../node_modules/@dcl/react-ecs/dist/components/listeners/types.js", "../node_modules/@dcl/react-ecs/dist/components/Label/index.js", "../node_modules/@dcl/react-ecs/dist/components/index.js", "../node_modules/@dcl/react-ecs/dist/reconciler/utils.js", "../node_modules/@dcl/react-ecs/dist/system.js", "../node_modules/@dcl/react-ecs/dist/index.js", "../node_modules/@dcl/sdk/src/react-ecs.ts", "../node_modules/@dcl/asset-packs/src/action-types.ts", "../node_modules/@dcl/asset-packs/src/enums.ts", "../node_modules/mitt/src/index.ts", "../node_modules/@dcl/asset-packs/src/events.ts", "../node_modules/@dcl/asset-packs/src/id.ts", "../node_modules/@dcl/asset-packs/src/states.ts", "../node_modules/@dcl/asset-packs/src/lww.ts", "../node_modules/@dcl/asset-packs/src/clone.ts", "../node_modules/@dcl/asset-packs/src/definitions.ts", "../node_modules/@dcl/asset-packs/src/actions.ts", "../node_modules/@dcl/asset-packs/src/timer.ts", "../node_modules/@dcl/asset-packs/src/ui.ts", "../node_modules/@dcl/asset-packs/src/triggers.ts", "../node_modules/@dcl/asset-packs/src/scene-entrypoint.ts", "../src/index.ts", "../node_modules/@dcl/sdk/src/index.ts", "../node_modules/@dcl/sdk/src/internal/transports/rendererTransport.ts", "../node_modules/@dcl/sdk/src/internal/Observable.ts", "../node_modules/@dcl/sdk/src/observables.ts", "sdk-composite:all-composites", "../node_modules/@dcl/sdk/src/composite-provider.ts"], + "sourceRoot": "file:///Users/Nico/Documents/github/horrible-tests/Mikas-kitchen-SDK7/bin", + "sourcesContent": ["\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n", "\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n", "\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n", "\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n", "\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n", "\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n", "\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(\"../util/minimal\");\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n", "\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(\"@protobufjs/aspromise\");\n\n// converts to / from base64 encoded strings\nutil.base64 = require(\"@protobufjs/base64\");\n\n// base class of rpc.Service\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\n\n// float handling accross browsers\nutil.float = require(\"@protobufjs/float\");\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(\"@protobufjs/inquire\");\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(\"@protobufjs/utf8\");\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(\"@protobufjs/pool\");\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(\"./longbits\");\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n", "\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n", "\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(\"./writer\");\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n", "\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n", "\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(\"./reader\");\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n", "\"use strict\";\nmodule.exports = Service;\n\nvar util = require(\"../util/minimal\");\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n", "\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(\"./rpc/service\");\n", "\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n", "\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(\"./writer\");\nprotobuf.BufferWriter = require(\"./writer_buffer\");\nprotobuf.Reader = require(\"./reader\");\nprotobuf.BufferReader = require(\"./reader_buffer\");\n\n// Utility\nprotobuf.util = require(\"./util/minimal\");\nprotobuf.rpc = require(\"./rpc\");\nprotobuf.roots = require(\"./roots\");\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n", "// minimal library entry point.\n\n\"use strict\";\nmodule.exports = require(\"./src/index-minimal\");\n", "/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n", "/**\n * @license React\n * react-reconciler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nmodule.exports = function $$$reconciler($$$hostConfig) {\n var exports = {};\n'use strict';var aa=require(\"react\"),ba=require(\"scheduler\"),ca=Object.assign;function m(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;ch||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{dc=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?cc(a):\"\"}var fc=Object.prototype.hasOwnProperty,gc=[],hc=-1;function ic(a){return{current:a}}\nfunction q(a){0>hc||(a.current=gc[hc],gc[hc]=null,hc--)}function v(a,b){hc++;gc[hc]=a.current;a.current=b}var jc={},x=ic(jc),z=ic(!1),kc=jc;function lc(a,b){var c=a.type.contextTypes;if(!c)return jc;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction A(a){a=a.childContextTypes;return null!==a&&void 0!==a}function mc(){q(z);q(x)}function nc(a,b,c){if(x.current!==jc)throw Error(m(168));v(x,b);v(z,c)}function oc(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(m(108,va(a)||\"Unknown\",e));return ca({},c,d)}\nfunction pc(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||jc;kc=x.current;v(x,a);v(z,z.current);return!0}function rc(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=oc(a,b,kc),d.__reactInternalMemoizedMergedChildContext=a,q(z),q(x),v(x,a)):q(z);v(z,c)}var tc=Math.clz32?Math.clz32:sc,uc=Math.log,vc=Math.LN2;function sc(a){a>>>=0;return 0===a?32:31-(uc(a)/vc|0)|0}var wc=64,xc=4194304;\nfunction yc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function zc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=yc(h):(f&=g,0!==f&&(d=yc(f)))}else g=c&~e,0!==g?d=yc(g):0!==f&&(d=yc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Fc(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-tc(b);a[b]=c}function Gc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0>=g;e-=g;id=1<<32-tc(b)+e|c<u?(E=r,r=null):E=r.sibling;var y=p(e,r,h[u],k);if(null===y){null===r&&(r=E);break}a&&r&&null===y.alternate&&b(e,r);g=f(y,g,u);null===n?l=y:n.sibling=y;n=y;r=E}if(u===h.length)return c(e,r),F&&kd(e,u),l;if(null===r){for(;uu?(E=r,r=null):E=r.sibling;var w=p(e,r,y.value,k);if(null===w){null===r&&(r=E);break}a&&r&&null===w.alternate&&b(e,r);g=f(w,g,u);null===n?l=w:n.sibling=w;n=w;r=E}if(y.done)return c(e,\nr),F&&kd(e,u),l;if(null===r){for(;!y.done;u++,y=h.next())y=t(e,y.value,k),null!==y&&(g=f(y,g,u),null===n?l=y:n.sibling=y,n=y);F&&kd(e,u);return l}for(r=d(e,r);!y.done;u++,y=h.next())y=B(r,e,u,y.value,k),null!==y&&(a&&null!==y.alternate&&r.delete(null===y.key?u:y.key),g=f(y,g,u),null===n?l=y:n.sibling=y,n=y);a&&r.forEach(function(a){return b(e,a)});F&&kd(e,u);return l}function za(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ha&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==\nf){switch(f.$$typeof){case ea:a:{for(var k=f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ha){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===qa&&oe(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=me(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ha?(d=ue(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=se(f.type,f.key,f.props,null,a.mode,h),h.ref=me(a,d,f),h.return=\na,a=h)}return g(a);case fa:a:{for(l=f.key;null!==d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=te(f,a.mode,h);d.return=a;a=d}return g(a);case qa:return l=f._init,za(a,d,l(f._payload),h)}if(Da(f))return w(a,d,f,h);if(ta(f))return Z(a,d,f,h);ne(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&\n6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=re(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return za}var ve=pe(!0),we=pe(!1),xe={},ye=ic(xe),ze=ic(xe),Ae=ic(xe);function Be(a){if(a===xe)throw Error(m(174));return a}function Ce(a,b){v(Ae,b);v(ze,a);v(ye,xe);a=Fa(b);q(ye);v(ye,a)}function De(){q(ye);q(ze);q(Ae)}function Ee(a){var b=Be(Ae.current),c=Be(ye.current);b=Ga(c,a.type,b);c!==b&&(v(ze,a),v(ye,b))}function Fe(a){ze.current===a&&(q(ye),q(ze))}var J=ic(0);\nfunction Ge(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||Jb(c)||Kb(c)))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var He=[];\nfunction Ie(){for(var a=0;ac?c:4;a(!0);var d=Ke.transition;Ke.transition={};try{a(!1),b()}finally{C=c,Ke.transition=d}}function Af(){return Ye().memoizedState}\nfunction Bf(a,b,c){var d=fe(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Cf(a))Df(b,c);else if(c=Sd(a,b,c,d),null!==c){var e=I();ge(c,a,d,e);Ef(c,b,d)}}\nfunction mf(a,b,c){var d=fe(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Cf(a))Df(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(Vc(h,g)){var k=b.interleaved;null===k?(e.next=e,Rd(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Sd(a,b,e,d);null!==c&&(e=I(),ge(c,a,d,e),Ef(c,b,d))}}\nfunction Cf(a){var b=a.alternate;return a===K||null!==b&&b===K}function Df(a,b){Ne=Me=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ef(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Hc(a,c)}}\nvar Ve={readContext:Pd,useCallback:N,useContext:N,useEffect:N,useImperativeHandle:N,useInsertionEffect:N,useLayoutEffect:N,useMemo:N,useReducer:N,useRef:N,useState:N,useDebugValue:N,useDeferredValue:N,useTransition:N,useMutableSource:N,useSyncExternalStore:N,useId:N,unstable_isNewReconciler:!1},Se={readContext:Pd,useCallback:function(a,b){Xe().memoizedState=[a,void 0===b?null:b];return a},useContext:Pd,useEffect:qf,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return of(4194308,\n4,tf.bind(null,b,a),c)},useLayoutEffect:function(a,b){return of(4194308,4,a,b)},useInsertionEffect:function(a,b){return of(4,2,a,b)},useMemo:function(a,b){var c=Xe();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Xe();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Bf.bind(null,K,a);return[d.memoizedState,a]},useRef:function(a){var b=\nXe();a={current:a};return b.memoizedState=a},useState:lf,useDebugValue:vf,useDeferredValue:function(a){return Xe().memoizedState=a},useTransition:function(){var a=lf(!1),b=a[0];a=zf.bind(null,a[1]);Xe().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=K,e=Xe();if(F){if(void 0===c)throw Error(m(407));c=c()}else{c=b();if(null===O)throw Error(m(349));0!==(Le&30)||hf(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;qf(ef.bind(null,d,\nf,a),[a]);d.flags|=2048;ff(9,gf.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Xe(),b=O.identifierPrefix;if(F){var c=jd;var d=id;c=(d&~(1<<32-tc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Oe++;0Eg&&(b.flags|=128,d=!0,Bg(e,!1),b.lanes=4194304)}else{if(!d)if(a=Ge(f),null!==a){if(b.flags|=128,d=!0,a=a.updateQueue,null!==a&&(b.updateQueue=a,b.flags|=4),Bg(e,!0),null===e.tail&&\"hidden\"===e.tailMode&&!f.alternate&&!F)return Q(b),null}else 2*D()-e.renderingStartTime>Eg&&1073741824!==c&&(b.flags|=128,d=!0,Bg(e,!1),b.lanes=\n4194304);e.isBackwards?(f.sibling=b.child,b.child=f):(a=e.last,null!==a?a.sibling=f:b.child=f,e.last=f)}if(null!==e.tail)return b=e.tail,e.rendering=b,e.tail=b.sibling,e.renderingStartTime=D(),b.sibling=null,a=J.current,v(J,d?a&1|2:a&1),b;Q(b);return null;case 22:case 23:return Fg(),c=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==c&&(b.flags|=8192),c&&0!==(b.mode&1)?0!==(ag&1073741824)&&(Q(b),Ta&&b.subtreeFlags&6&&(b.flags|=8192)):Q(b),null;case 24:return null;case 25:return null}throw Error(m(156,\nb.tag));}\nfunction Gg(a,b){nd(b);switch(b.tag){case 1:return A(b.type)&&mc(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return De(),q(z),q(x),Ie(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Fe(b),null;case 13:q(J);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(m(340));Ad()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return q(J),null;case 4:return De(),null;case 10:return Md(b.type._context),null;case 22:case 23:return Fg(),\nnull;case 24:return null;default:return null}}var Hg=!1,S=!1,Ig=\"function\"===typeof WeakSet?WeakSet:Set,T=null;function Jg(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){U(a,b,d)}else c.current=null}function Kg(a,b,c){try{c()}catch(d){U(a,b,d)}}var Lg=!1;\nfunction Mg(a,b){Ha(a.containerInfo);for(T=b;null!==T;)if(a=T,b=a.child,0!==(a.subtreeFlags&1028)&&null!==b)b.return=a,T=b;else for(;null!==T;){a=T;try{var c=a.alternate;if(0!==(a.flags&1024))switch(a.tag){case 0:case 11:case 15:break;case 1:if(null!==c){var d=c.memoizedProps,e=c.memoizedState,f=a.stateNode,g=f.getSnapshotBeforeUpdate(a.elementType===a.type?d:Fd(a.type,d),e);f.__reactInternalSnapshotBeforeUpdate=g}break;case 3:Ta&&xb(a.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;\ndefault:throw Error(m(163));}}catch(h){U(a,a.return,h)}b=a.sibling;if(null!==b){b.return=a.return;T=b;break}T=a.return}c=Lg;Lg=!1;return c}function Ng(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Kg(b,c,f)}e=e.next}while(e!==d)}}function Og(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}\nfunction Pg(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=Ea(c);break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}function Qg(a){var b=a.alternate;null!==b&&(a.alternate=null,Qg(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&Za(b));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}\nfunction Rg(a){return 5===a.tag||3===a.tag||4===a.tag}function Sg(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Rg(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Tg(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?pb(c,a,b):kb(c,a);else if(4!==d&&(a=a.child,null!==a))for(Tg(a,b,c),a=a.sibling;null!==a;)Tg(a,b,c),a=a.sibling}function Ug(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?ob(c,a,b):jb(c,a);else if(4!==d&&(a=a.child,null!==a))for(Ug(a,b,c),a=a.sibling;null!==a;)Ug(a,b,c),a=a.sibling}var V=null,Vg=!1;function Wg(a,b,c){for(c=c.child;null!==c;)Xg(a,b,c),c=c.sibling}\nfunction Xg(a,b,c){if(Sc&&\"function\"===typeof Sc.onCommitFiberUnmount)try{Sc.onCommitFiberUnmount(Rc,c)}catch(h){}switch(c.tag){case 5:S||Jg(c,b);case 6:if(Ta){var d=V,e=Vg;V=null;Wg(a,b,c);V=d;Vg=e;null!==V&&(Vg?rb(V,c.stateNode):qb(V,c.stateNode))}else Wg(a,b,c);break;case 18:Ta&&null!==V&&(Vg?Yb(V,c.stateNode):Xb(V,c.stateNode));break;case 4:Ta?(d=V,e=Vg,V=c.stateNode.containerInfo,Vg=!0,Wg(a,b,c),V=d,Vg=e):(Ua&&(d=c.stateNode.containerInfo,e=zb(d),Cb(d,e)),Wg(a,b,c));break;case 0:case 11:case 14:case 15:if(!S&&\n(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Kg(c,b,g):0!==(f&4)&&Kg(c,b,g));e=e.next}while(e!==d)}Wg(a,b,c);break;case 1:if(!S&&(Jg(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){U(c,b,h)}Wg(a,b,c);break;case 21:Wg(a,b,c);break;case 22:c.mode&1?(S=(d=S)||null!==c.memoizedState,Wg(a,b,c),S=d):Wg(a,b,c);break;default:Wg(a,b,\nc)}}function Yg(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Ig);b.forEach(function(b){var d=Zg.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction $g(a,b){var c=b.deletions;if(null!==c)for(var d=0;d\";case jh:return\":has(\"+(qh(a)||\"\")+\")\";case kh:return'[role=\"'+a.value+'\"]';case mh:return'\"'+a.value+'\"';case lh:return'[data-testname=\"'+a.value+'\"]';default:throw Error(m(365));}}\nfunction rh(a,b){var c=[];a=[a,0];for(var d=0;de&&(e=g);d&=~f}d=e;d=D()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*th(d/1960))-d;if(10a?16:a;if(null===Eh)var d=!1;else{a=Eh;Eh=null;Fh=0;if(0!==(H&6))throw Error(m(331));var e=H;H|=4;for(T=a.current;null!==T;){var f=T,g=f.child;if(0!==(T.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kD()-ch?Sh(a,0):yh|=c);Lh(a,b)}function ei(a,b){0===b&&(0===(a.mode&1)?b=1:(b=xc,xc<<=1,0===(xc&130023424)&&(xc=4194304)));var c=I();a=Td(a,b);null!==a&&(Fc(a,b,c),Lh(a,c))}function pg(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);ei(a,c)}\nfunction Zg(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(m(314));}null!==d&&d.delete(b);ei(a,c)}var bi;\nbi=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||z.current)G=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return G=!1,tg(a,b,c);G=0!==(a.flags&131072)?!0:!1}else G=!1,F&&0!==(b.flags&1048576)&&ld(b,ed,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;dg(a,b);a=b.pendingProps;var e=lc(b,x.current);Od(b,c);e=Re(null,b,d,a,e,c);var f=We();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=null,\nA(d)?(f=!0,pc(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,Vd(b),e.updater=he,b.stateNode=e,e._reactInternals=b,le(b,d,a,c),b=eg(null,b,d,!0,f,c)):(b.tag=0,F&&f&&md(b),P(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{dg(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=fi(d);a=Fd(d,a);switch(e){case 0:b=Yf(null,b,d,a,c);break a;case 1:b=cg(null,b,d,a,c);break a;case 11:b=Tf(null,b,d,a,c);break a;case 14:b=Vf(null,b,d,Fd(d.type,a),c);break a}throw Error(m(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),Yf(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),cg(a,b,d,e,c);case 3:a:{fg(b);if(null===a)throw Error(m(387));d=b.pendingProps;f=b.memoizedState;e=f.element;Wd(a,b);ae(b,d,null,c);var g=b.memoizedState;d=g.element;if(Va&&f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ff(Error(m(423)),b);b=gg(a,b,d,c,e);break a}else if(d!==e){e=Ff(Error(m(424)),b);b=gg(a,b,d,c,e);break a}else for(Va&&(pd=Pb(b.stateNode.containerInfo),od=b,F=!0,rd=null,qd=!1),c=we(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ad();if(d===e){b=Uf(a,b,c);break a}P(a,b,d,c)}b=b.child}return b;case 5:return Ee(b),null===a&&wd(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Na(d,e)?g=null:null!==f&&Na(d,f)&&(b.flags|=32),\nbg(a,b),P(a,b,g,c),b.child;case 6:return null===a&&wd(b),null;case 13:return jg(a,b,c);case 4:return Ce(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=ve(b,null,d,c):P(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),Tf(a,b,d,e,c);case 7:return P(a,b,b.pendingProps,c),b.child;case 8:return P(a,b,b.pendingProps.children,c),b.child;case 12:return P(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;Ld(b,d,g);if(null!==f)if(Vc(f.value,g)){if(f.children===e.children&&!z.current){b=Uf(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=Xd(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var n=l.pending;null===n?k.next=k:(k.next=n.next,n.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Nd(f.return,c,b);h.lanes|=c;break}k=k.next}}else if(10===\nf.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(m(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Nd(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}P(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Od(b,c),e=Pd(e),d=d(e),b.flags|=1,P(a,b,d,c),b.child;case 14:return d=b.type,e=Fd(d,b.pendingProps),\ne=Fd(d.type,e),Vf(a,b,d,e,c);case 15:return Xf(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),dg(a,b),b.tag=1,A(d)?(a=!0,pc(b)):a=!1,Od(b,c),je(b,d,e),le(b,d,e,c),eg(null,b,d,!0,a,c);case 19:return sg(a,b,c);case 22:return Zf(a,b,c)}throw Error(m(156,b.tag));};function Nh(a,b){return Jc(a,b)}\nfunction gi(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function td(a,b,c,d){return new gi(a,b,c,d)}function Wf(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction fi(a){if(\"function\"===typeof a)return Wf(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===ma)return 11;if(a===pa)return 14}return 2}\nfunction qe(a,b){var c=a.alternate;null===c?(c=td(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction se(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)Wf(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ha:return ue(c.children,e,f,b);case ia:g=8;e|=8;break;case ja:return a=td(12,c,b,e|2),a.elementType=ja,a.lanes=f,a;case na:return a=td(13,c,b,e),a.elementType=na,a.lanes=f,a;case oa:return a=td(19,c,b,e),a.elementType=oa,a.lanes=f,a;case ra:return kg(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case ka:g=10;break a;case la:g=9;break a;case ma:g=11;\nbreak a;case pa:g=14;break a;case qa:g=16;d=null;break a}throw Error(m(130,null==a?a:typeof a,\"\"));}b=td(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function ue(a,b,c,d){a=td(7,a,d,b);a.lanes=c;return a}function kg(a,b,c,d){a=td(22,a,d,b);a.elementType=ra;a.lanes=c;a.stateNode={isHidden:!1};return a}function re(a,b,c){a=td(6,a,null,b);a.lanes=c;return a}\nfunction te(a,b,c){b=td(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction hi(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=Ra;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=Ec(0);this.expirationTimes=Ec(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Ec(0);this.identifierPrefix=d;this.onRecoverableError=e;Va&&(this.mutableSourceEagerHydrationData=\nnull)}function ii(a,b,c,d,e,f,g,h,k){a=new hi(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=td(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};Vd(f);return a}\nfunction ji(a){if(!a)return jc;a=a._reactInternals;a:{if(wa(a)!==a||1!==a.tag)throw Error(m(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(A(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(m(171));}if(1===a.tag){var c=a.type;if(A(c))return oc(a,c,b)}return b}\nfunction ki(a){var b=a._reactInternals;if(void 0===b){if(\"function\"===typeof a.render)throw Error(m(188));a=Object.keys(a).join(\",\");throw Error(m(268,a));}a=Aa(b);return null===a?null:a.stateNode}function li(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c=l&&f>=t&&e<=n&&g<=p){a.splice(b,1);break}else if(!(d!==l||c.width!==k.width||pg)){t>f&&(k.height+=t-f,k.y=f);pe)){l>d&&(k.width+=\nl-d,k.x=d);nc&&(c=g)),g \")+\"\\n\\nNo matching component was found for:\\n \")+a.join(\" > \")}return null};\nexports.getPublicRootInstance=function(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return Ea(a.child.stateNode);default:return a.child.stateNode}};\nexports.injectIntoDevTools=function(a){a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:da.ReactCurrentDispatcher,findHostInstanceByFiber:ni,findFiberByHostInstance:a.findFiberByHostInstance||\noi,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:\"18.2.0\"};if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)a=!1;else{var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)a=!0;else{try{Rc=b.inject(a),Sc=b}catch(c){}a=b.checkDCE?!0:!1}}return a};exports.isAlreadyRendering=function(){return!1};\nexports.observeVisibleRects=function(a,b,c,d){if(!bb)throw Error(m(363));a=sh(a,b);var e=ib(a,c,d).disconnect;return{disconnect:function(){e()}}};exports.registerMutableSourceForHydration=function(a,b){var c=b._getVersion;c=c(b._source);null==a.mutableSourceEagerHydrationData?a.mutableSourceEagerHydrationData=[b,c]:a.mutableSourceEagerHydrationData.push(b,c)};exports.runWithPriority=function(a,b){var c=C;try{return C=a,b()}finally{C=c}};exports.shouldError=function(){return null};\nexports.shouldSuspend=function(){return!1};exports.updateContainer=function(a,b,c,d){var e=b.current,f=I(),g=fe(e);c=ji(c);null===b.context?b.context=c:b.pendingContext=c;b=Xd(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=Yd(e,b,g);null!==a&&(ge(a,e,g,f),Zd(a,e,g));return g};\n\n return exports;\n};\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-reconciler.production.min.js');\n} else {\n module.exports = require('./cjs/react-reconciler.development.js');\n}\n", "// BEGIN AUTO GENERATED CODE \"~sdk/scene-entrypoint\"\n\"use strict\";\nimport * as entrypoint from '/Users/Nico/Documents/github/horrible-tests/Mikas-kitchen-SDK7/src/index.ts'\nimport { engine } from '@dcl/sdk/ecs'\nimport * as sdk from '@dcl/sdk'\n\nif ((entrypoint as any).main !== undefined) {\n function _INTERNAL_startup_system() {\n const maybePromise = (entrypoint as any).main()\n if (maybePromise && typeof maybePromise === 'object' && typeof (maybePromise as unknown as Promise).then === 'function') {\n maybePromise.catch(console.error)\n }\n engine.removeSystem(_INTERNAL_startup_system)\n }\n engine.addSystem(_INTERNAL_startup_system, Infinity)\n}\n\nexport * from '@dcl/sdk'\nexport * from '/Users/Nico/Documents/github/horrible-tests/Mikas-kitchen-SDK7/src/index.ts'\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBAnimator() {\n return { states: [] };\n}\n/**\n * @public\n */\nexport var PBAnimator;\n(function (PBAnimator) {\n function encode(message, writer = _m0.Writer.create()) {\n for (const v of message.states) {\n PBAnimationState.encode(v, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n }\n PBAnimator.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAnimator();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.states.push(PBAnimationState.decode(reader, reader.uint32()));\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAnimator.decode = decode;\n})(PBAnimator || (PBAnimator = {}));\nfunction createBasePBAnimationState() {\n return { clip: \"\", playing: undefined, weight: undefined, speed: undefined, loop: undefined, shouldReset: undefined };\n}\n/**\n * @public\n */\nexport var PBAnimationState;\n(function (PBAnimationState) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.clip !== \"\") {\n writer.uint32(18).string(message.clip);\n }\n if (message.playing !== undefined) {\n writer.uint32(24).bool(message.playing);\n }\n if (message.weight !== undefined) {\n writer.uint32(37).float(message.weight);\n }\n if (message.speed !== undefined) {\n writer.uint32(45).float(message.speed);\n }\n if (message.loop !== undefined) {\n writer.uint32(48).bool(message.loop);\n }\n if (message.shouldReset !== undefined) {\n writer.uint32(56).bool(message.shouldReset);\n }\n return writer;\n }\n PBAnimationState.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAnimationState();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 2:\n if (tag !== 18) {\n break;\n }\n message.clip = reader.string();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.playing = reader.bool();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.weight = reader.float();\n continue;\n case 5:\n if (tag !== 45) {\n break;\n }\n message.speed = reader.float();\n continue;\n case 6:\n if (tag !== 48) {\n break;\n }\n message.loop = reader.bool();\n continue;\n case 7:\n if (tag !== 56) {\n break;\n }\n message.shouldReset = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAnimationState.decode = decode;\n})(PBAnimationState || (PBAnimationState = {}));\n", "import { PBAnimator } from './pb/decentraland/sdk/components/animator.gen';\n/**\n * @internal\n */\nexport const AnimatorSchema = {\n COMPONENT_ID: 1042,\n serialize(value, builder) {\n const writer = PBAnimator.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAnimator.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAnimator.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAnimator\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBAudioSource() {\n return { playing: undefined, volume: undefined, loop: undefined, pitch: undefined, audioClipUrl: \"\" };\n}\n/**\n * @public\n */\nexport var PBAudioSource;\n(function (PBAudioSource) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.playing !== undefined) {\n writer.uint32(8).bool(message.playing);\n }\n if (message.volume !== undefined) {\n writer.uint32(21).float(message.volume);\n }\n if (message.loop !== undefined) {\n writer.uint32(24).bool(message.loop);\n }\n if (message.pitch !== undefined) {\n writer.uint32(37).float(message.pitch);\n }\n if (message.audioClipUrl !== \"\") {\n writer.uint32(42).string(message.audioClipUrl);\n }\n return writer;\n }\n PBAudioSource.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAudioSource();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.playing = reader.bool();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.volume = reader.float();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.loop = reader.bool();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.pitch = reader.float();\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.audioClipUrl = reader.string();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAudioSource.decode = decode;\n})(PBAudioSource || (PBAudioSource = {}));\n", "import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';\n/**\n * @internal\n */\nexport const AudioSourceSchema = {\n COMPONENT_ID: 1020,\n serialize(value, builder) {\n const writer = PBAudioSource.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAudioSource.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAudioSource.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAudioSource\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBAudioStream() {\n return { playing: undefined, volume: undefined, url: \"\" };\n}\n/**\n * @public\n */\nexport var PBAudioStream;\n(function (PBAudioStream) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.playing !== undefined) {\n writer.uint32(8).bool(message.playing);\n }\n if (message.volume !== undefined) {\n writer.uint32(21).float(message.volume);\n }\n if (message.url !== \"\") {\n writer.uint32(26).string(message.url);\n }\n return writer;\n }\n PBAudioStream.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAudioStream();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.playing = reader.bool();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.volume = reader.float();\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.url = reader.string();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAudioStream.decode = decode;\n})(PBAudioStream || (PBAudioStream = {}));\n", "import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';\n/**\n * @internal\n */\nexport const AudioStreamSchema = {\n COMPONENT_ID: 1021,\n serialize(value, builder) {\n const writer = PBAudioStream.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAudioStream.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAudioStream.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAudioStream\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */\n/**\n * @public\n */\nexport var AvatarAnchorPointType;\n(function (AvatarAnchorPointType) {\n AvatarAnchorPointType[AvatarAnchorPointType[\"AAPT_POSITION\"] = 0] = \"AAPT_POSITION\";\n AvatarAnchorPointType[AvatarAnchorPointType[\"AAPT_NAME_TAG\"] = 1] = \"AAPT_NAME_TAG\";\n AvatarAnchorPointType[AvatarAnchorPointType[\"AAPT_LEFT_HAND\"] = 2] = \"AAPT_LEFT_HAND\";\n AvatarAnchorPointType[AvatarAnchorPointType[\"AAPT_RIGHT_HAND\"] = 3] = \"AAPT_RIGHT_HAND\";\n})(AvatarAnchorPointType || (AvatarAnchorPointType = {}));\nfunction createBasePBAvatarAttach() {\n return { avatarId: undefined, anchorPointId: 0 };\n}\n/**\n * @public\n */\nexport var PBAvatarAttach;\n(function (PBAvatarAttach) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.avatarId !== undefined) {\n writer.uint32(10).string(message.avatarId);\n }\n if (message.anchorPointId !== 0) {\n writer.uint32(16).int32(message.anchorPointId);\n }\n return writer;\n }\n PBAvatarAttach.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAvatarAttach();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.avatarId = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.anchorPointId = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAvatarAttach.decode = decode;\n})(PBAvatarAttach || (PBAvatarAttach = {}));\n", "import { PBAvatarAttach } from './pb/decentraland/sdk/components/avatar_attach.gen';\n/**\n * @internal\n */\nexport const AvatarAttachSchema = {\n COMPONENT_ID: 1073,\n serialize(value, builder) {\n const writer = PBAvatarAttach.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAvatarAttach.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAvatarAttach.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAvatarAttach\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Vector3 } from \"../../common/vectors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/** AvatarModifierType is an effect that should be applied to avatars inside the region. */\n/**\n * @public\n */\nexport var AvatarModifierType;\n(function (AvatarModifierType) {\n /** AMT_HIDE_AVATARS - avatars are invisible */\n AvatarModifierType[AvatarModifierType[\"AMT_HIDE_AVATARS\"] = 0] = \"AMT_HIDE_AVATARS\";\n /** AMT_DISABLE_PASSPORTS - selecting (e.g. clicking) an avatar will not bring up their profile. */\n AvatarModifierType[AvatarModifierType[\"AMT_DISABLE_PASSPORTS\"] = 1] = \"AMT_DISABLE_PASSPORTS\";\n})(AvatarModifierType || (AvatarModifierType = {}));\nfunction createBasePBAvatarModifierArea() {\n return { area: undefined, excludeIds: [], modifiers: [] };\n}\n/**\n * @public\n */\nexport var PBAvatarModifierArea;\n(function (PBAvatarModifierArea) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.area !== undefined) {\n Vector3.encode(message.area, writer.uint32(10).fork()).ldelim();\n }\n for (const v of message.excludeIds) {\n writer.uint32(18).string(v);\n }\n writer.uint32(26).fork();\n for (const v of message.modifiers) {\n writer.int32(v);\n }\n writer.ldelim();\n return writer;\n }\n PBAvatarModifierArea.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAvatarModifierArea();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.area = Vector3.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.excludeIds.push(reader.string());\n continue;\n case 3:\n if (tag === 24) {\n message.modifiers.push(reader.int32());\n continue;\n }\n if (tag === 26) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.modifiers.push(reader.int32());\n }\n continue;\n }\n break;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAvatarModifierArea.decode = decode;\n})(PBAvatarModifierArea || (PBAvatarModifierArea = {}));\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.common\";\nfunction createBasePosition() {\n return { x: 0, y: 0, z: 0 };\n}\n/**\n * @public\n */\nexport var Position;\n(function (Position) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.x !== 0) {\n writer.uint32(13).float(message.x);\n }\n if (message.y !== 0) {\n writer.uint32(21).float(message.y);\n }\n if (message.z !== 0) {\n writer.uint32(29).float(message.z);\n }\n return writer;\n }\n Position.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePosition();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.x = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.y = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.z = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Position.decode = decode;\n})(Position || (Position = {}));\nfunction createBaseVector3() {\n return { x: 0, y: 0, z: 0 };\n}\n/**\n * @public\n */\nexport var Vector3;\n(function (Vector3) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.x !== 0) {\n writer.uint32(13).float(message.x);\n }\n if (message.y !== 0) {\n writer.uint32(21).float(message.y);\n }\n if (message.z !== 0) {\n writer.uint32(29).float(message.z);\n }\n return writer;\n }\n Vector3.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVector3();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.x = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.y = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.z = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Vector3.decode = decode;\n})(Vector3 || (Vector3 = {}));\nfunction createBaseVector2() {\n return { x: 0, y: 0 };\n}\n/**\n * @public\n */\nexport var Vector2;\n(function (Vector2) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.x !== 0) {\n writer.uint32(13).float(message.x);\n }\n if (message.y !== 0) {\n writer.uint32(21).float(message.y);\n }\n return writer;\n }\n Vector2.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVector2();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.x = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.y = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Vector2.decode = decode;\n})(Vector2 || (Vector2 = {}));\nfunction createBaseQuaternion() {\n return { x: 0, y: 0, z: 0, w: 0 };\n}\n/**\n * @public\n */\nexport var Quaternion;\n(function (Quaternion) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.x !== 0) {\n writer.uint32(13).float(message.x);\n }\n if (message.y !== 0) {\n writer.uint32(21).float(message.y);\n }\n if (message.z !== 0) {\n writer.uint32(29).float(message.z);\n }\n if (message.w !== 0) {\n writer.uint32(37).float(message.w);\n }\n return writer;\n }\n Quaternion.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseQuaternion();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.x = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.y = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.z = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.w = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Quaternion.decode = decode;\n})(Quaternion || (Quaternion = {}));\n", "import { PBAvatarModifierArea } from './pb/decentraland/sdk/components/avatar_modifier_area.gen';\n/**\n * @internal\n */\nexport const AvatarModifierAreaSchema = {\n COMPONENT_ID: 1070,\n serialize(value, builder) {\n const writer = PBAvatarModifierArea.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAvatarModifierArea.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAvatarModifierArea.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAvatarModifierArea\"\n }\n};\n", "/**\n * @license\n * Copyright 2009 The Closure Library Authors\n * Copyright 2020 Daniel Wirtz / The long.js Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// WebAssembly optimizations to do native i64 multiplication and divide\nvar wasm = null;\ntry {\n wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([\n 0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11\n ])), {}).exports;\n} catch (e) {\n // no wasm support :(\n}\n\n/**\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\n * See the from* functions below for more convenient ways of constructing Longs.\n * @exports Long\n * @class A Long class for representing a 64 bit two's-complement integer value.\n * @param {number} low The low (signed) 32 bits of the long\n * @param {number} high The high (signed) 32 bits of the long\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @constructor\n */\nfunction Long(low, high, unsigned) {\n\n /**\n * The low 32 bits as a signed value.\n * @type {number}\n */\n this.low = low | 0;\n\n /**\n * The high 32 bits as a signed value.\n * @type {number}\n */\n this.high = high | 0;\n\n /**\n * Whether unsigned or not.\n * @type {boolean}\n */\n this.unsigned = !!unsigned;\n}\n\n// The internal representation of a long is the two given signed, 32-bit values.\n// We use 32-bit pieces because these are the size of integers on which\n// Javascript performs bit-operations. For operations like addition and\n// multiplication, we split each number into 16 bit pieces, which can easily be\n// multiplied within Javascript's floating-point representation without overflow\n// or change in sign.\n//\n// In the algorithms below, we frequently reduce the negative case to the\n// positive case by negating the input(s) and then post-processing the result.\n// Note that we must ALWAYS check specially whether those values are MIN_VALUE\n// (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\n// a positive number, it overflows back into a negative). Not handling this\n// case would often result in infinite recursion.\n//\n// Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\n// methods on which they depend.\n\n/**\n * An indicator used to reliably determine if an object is a Long or not.\n * @type {boolean}\n * @const\n * @private\n */\nLong.prototype.__isLong__;\n\nObject.defineProperty(Long.prototype, \"__isLong__\", { value: true });\n\n/**\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n * @inner\n */\nfunction isLong(obj) {\n return (obj && obj[\"__isLong__\"]) === true;\n}\n\n/**\n * @function\n * @param {*} value number\n * @returns {number}\n * @inner\n */\nfunction ctz32(value) {\n var c = Math.clz32(value & -value);\n return value ? 31 - c : c;\n}\n\n/**\n * Tests if the specified object is a Long.\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n */\nLong.isLong = isLong;\n\n/**\n * A cache of the Long representations of small integer values.\n * @type {!Object}\n * @inner\n */\nvar INT_CACHE = {};\n\n/**\n * A cache of the Long representations of small unsigned integer values.\n * @type {!Object}\n * @inner\n */\nvar UINT_CACHE = {};\n\n/**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromInt(value, unsigned) {\n var obj, cachedObj, cache;\n if (unsigned) {\n value >>>= 0;\n if (cache = (0 <= value && value < 256)) {\n cachedObj = UINT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, 0, true);\n if (cache)\n UINT_CACHE[value] = obj;\n return obj;\n } else {\n value |= 0;\n if (cache = (-128 <= value && value < 128)) {\n cachedObj = INT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, value < 0 ? -1 : 0, false);\n if (cache)\n INT_CACHE[value] = obj;\n return obj;\n }\n}\n\n/**\n * Returns a Long representing the given 32 bit integer value.\n * @function\n * @param {number} value The 32 bit integer in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\nLong.fromInt = fromInt;\n\n/**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromNumber(value, unsigned) {\n if (isNaN(value))\n return unsigned ? UZERO : ZERO;\n if (unsigned) {\n if (value < 0)\n return UZERO;\n if (value >= TWO_PWR_64_DBL)\n return MAX_UNSIGNED_VALUE;\n } else {\n if (value <= -TWO_PWR_63_DBL)\n return MIN_VALUE;\n if (value + 1 >= TWO_PWR_63_DBL)\n return MAX_VALUE;\n }\n if (value < 0)\n return fromNumber(-value, unsigned).neg();\n return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);\n}\n\n/**\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\n * @function\n * @param {number} value The number in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\nLong.fromNumber = fromNumber;\n\n/**\n * @param {number} lowBits\n * @param {number} highBits\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromBits(lowBits, highBits, unsigned) {\n return new Long(lowBits, highBits, unsigned);\n}\n\n/**\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\n * assumed to use 32 bits.\n * @function\n * @param {number} lowBits The low 32 bits\n * @param {number} highBits The high 32 bits\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\nLong.fromBits = fromBits;\n\n/**\n * @function\n * @param {number} base\n * @param {number} exponent\n * @returns {number}\n * @inner\n */\nvar pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\n\n/**\n * @param {string} str\n * @param {(boolean|number)=} unsigned\n * @param {number=} radix\n * @returns {!Long}\n * @inner\n */\nfunction fromString(str, unsigned, radix) {\n if (str.length === 0)\n throw Error('empty string');\n if (typeof unsigned === 'number') {\n // For goog.math.long compatibility\n radix = unsigned;\n unsigned = false;\n } else {\n unsigned = !!unsigned;\n }\n if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\n return unsigned ? UZERO : ZERO;\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError('radix');\n\n var p;\n if ((p = str.indexOf('-')) > 0)\n throw Error('interior hyphen');\n else if (p === 0) {\n return fromString(str.substring(1), unsigned, radix).neg();\n }\n\n // Do several (8) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 8));\n\n var result = ZERO;\n for (var i = 0; i < str.length; i += 8) {\n var size = Math.min(8, str.length - i),\n value = parseInt(str.substring(i, i + size), radix);\n if (size < 8) {\n var power = fromNumber(pow_dbl(radix, size));\n result = result.mul(power).add(fromNumber(value));\n } else {\n result = result.mul(radixToPower);\n result = result.add(fromNumber(value));\n }\n }\n result.unsigned = unsigned;\n return result;\n}\n\n/**\n * Returns a Long representation of the given string, written using the specified radix.\n * @function\n * @param {string} str The textual representation of the Long\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\n * @returns {!Long} The corresponding Long value\n */\nLong.fromString = fromString;\n\n/**\n * @function\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromValue(val, unsigned) {\n if (typeof val === 'number')\n return fromNumber(val, unsigned);\n if (typeof val === 'string')\n return fromString(val, unsigned);\n // Throws for non-objects, converts non-instanceof Long:\n return fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);\n}\n\n/**\n * Converts the specified value to a Long using the appropriate from* function for its type.\n * @function\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long}\n */\nLong.fromValue = fromValue;\n\n// NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\n// no runtime penalty for these.\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_16_DBL = 1 << 16;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_24_DBL = 1 << 24;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\n\n/**\n * @type {!Long}\n * @const\n * @inner\n */\nvar TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\n\n/**\n * @type {!Long}\n * @inner\n */\nvar ZERO = fromInt(0);\n\n/**\n * Signed zero.\n * @type {!Long}\n */\nLong.ZERO = ZERO;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar UZERO = fromInt(0, true);\n\n/**\n * Unsigned zero.\n * @type {!Long}\n */\nLong.UZERO = UZERO;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar ONE = fromInt(1);\n\n/**\n * Signed one.\n * @type {!Long}\n */\nLong.ONE = ONE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar UONE = fromInt(1, true);\n\n/**\n * Unsigned one.\n * @type {!Long}\n */\nLong.UONE = UONE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar NEG_ONE = fromInt(-1);\n\n/**\n * Signed negative one.\n * @type {!Long}\n */\nLong.NEG_ONE = NEG_ONE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar MAX_VALUE = fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0, false);\n\n/**\n * Maximum signed value.\n * @type {!Long}\n */\nLong.MAX_VALUE = MAX_VALUE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF | 0, 0xFFFFFFFF | 0, true);\n\n/**\n * Maximum unsigned value.\n * @type {!Long}\n */\nLong.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar MIN_VALUE = fromBits(0, 0x80000000 | 0, false);\n\n/**\n * Minimum signed value.\n * @type {!Long}\n */\nLong.MIN_VALUE = MIN_VALUE;\n\n/**\n * @alias Long.prototype\n * @inner\n */\nvar LongPrototype = Long.prototype;\n\n/**\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\n * @this {!Long}\n * @returns {number}\n */\nLongPrototype.toInt = function toInt() {\n return this.unsigned ? this.low >>> 0 : this.low;\n};\n\n/**\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\n * @this {!Long}\n * @returns {number}\n */\nLongPrototype.toNumber = function toNumber() {\n if (this.unsigned)\n return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0);\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\n};\n\n/**\n * Converts the Long to a string written in the specified radix.\n * @this {!Long}\n * @param {number=} radix Radix (2-36), defaults to 10\n * @returns {string}\n * @override\n * @throws {RangeError} If `radix` is out of range\n */\nLongPrototype.toString = function toString(radix) {\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError('radix');\n if (this.isZero())\n return '0';\n if (this.isNegative()) { // Unsigned Longs are never negative\n if (this.eq(MIN_VALUE)) {\n // We need to change the Long value before it can be negated, so we remove\n // the bottom-most digit in this base and then recurse to do the rest.\n var radixLong = fromNumber(radix),\n div = this.div(radixLong),\n rem1 = div.mul(radixLong).sub(this);\n return div.toString(radix) + rem1.toInt().toString(radix);\n } else\n return '-' + this.neg().toString(radix);\n }\n\n // Do several (6) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\n rem = this;\n var result = '';\n while (true) {\n var remDiv = rem.div(radixToPower),\n intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\n digits = intval.toString(radix);\n rem = remDiv;\n if (rem.isZero())\n return digits + result;\n else {\n while (digits.length < 6)\n digits = '0' + digits;\n result = '' + digits + result;\n }\n }\n};\n\n/**\n * Gets the high 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed high bits\n */\nLongPrototype.getHighBits = function getHighBits() {\n return this.high;\n};\n\n/**\n * Gets the high 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned high bits\n */\nLongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\n return this.high >>> 0;\n};\n\n/**\n * Gets the low 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed low bits\n */\nLongPrototype.getLowBits = function getLowBits() {\n return this.low;\n};\n\n/**\n * Gets the low 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned low bits\n */\nLongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\n return this.low >>> 0;\n};\n\n/**\n * Gets the number of bits needed to represent the absolute value of this Long.\n * @this {!Long}\n * @returns {number}\n */\nLongPrototype.getNumBitsAbs = function getNumBitsAbs() {\n if (this.isNegative()) // Unsigned Longs are never negative\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\n var val = this.high != 0 ? this.high : this.low;\n for (var bit = 31; bit > 0; bit--)\n if ((val & (1 << bit)) != 0)\n break;\n return this.high != 0 ? bit + 33 : bit + 1;\n};\n\n/**\n * Tests if this Long's value equals zero.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isZero = function isZero() {\n return this.high === 0 && this.low === 0;\n};\n\n/**\n * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}.\n * @returns {boolean}\n */\nLongPrototype.eqz = LongPrototype.isZero;\n\n/**\n * Tests if this Long's value is negative.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isNegative = function isNegative() {\n return !this.unsigned && this.high < 0;\n};\n\n/**\n * Tests if this Long's value is positive or zero.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isPositive = function isPositive() {\n return this.unsigned || this.high >= 0;\n};\n\n/**\n * Tests if this Long's value is odd.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isOdd = function isOdd() {\n return (this.low & 1) === 1;\n};\n\n/**\n * Tests if this Long's value is even.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isEven = function isEven() {\n return (this.low & 1) === 0;\n};\n\n/**\n * Tests if this Long's value equals the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.equals = function equals(other) {\n if (!isLong(other))\n other = fromValue(other);\n if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1)\n return false;\n return this.high === other.high && this.low === other.low;\n};\n\n/**\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.eq = LongPrototype.equals;\n\n/**\n * Tests if this Long's value differs from the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.notEquals = function notEquals(other) {\n return !this.eq(/* validates */ other);\n};\n\n/**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.neq = LongPrototype.notEquals;\n\n/**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.ne = LongPrototype.notEquals;\n\n/**\n * Tests if this Long's value is less than the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lessThan = function lessThan(other) {\n return this.comp(/* validates */ other) < 0;\n};\n\n/**\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lt = LongPrototype.lessThan;\n\n/**\n * Tests if this Long's value is less than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\n return this.comp(/* validates */ other) <= 0;\n};\n\n/**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lte = LongPrototype.lessThanOrEqual;\n\n/**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.le = LongPrototype.lessThanOrEqual;\n\n/**\n * Tests if this Long's value is greater than the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.greaterThan = function greaterThan(other) {\n return this.comp(/* validates */ other) > 0;\n};\n\n/**\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.gt = LongPrototype.greaterThan;\n\n/**\n * Tests if this Long's value is greater than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\n return this.comp(/* validates */ other) >= 0;\n};\n\n/**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.gte = LongPrototype.greaterThanOrEqual;\n\n/**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.ge = LongPrototype.greaterThanOrEqual;\n\n/**\n * Compares this Long's value with the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\nLongPrototype.compare = function compare(other) {\n if (!isLong(other))\n other = fromValue(other);\n if (this.eq(other))\n return 0;\n var thisNeg = this.isNegative(),\n otherNeg = other.isNegative();\n if (thisNeg && !otherNeg)\n return -1;\n if (!thisNeg && otherNeg)\n return 1;\n // At this point the sign bits are the same\n if (!this.unsigned)\n return this.sub(other).isNegative() ? -1 : 1;\n // Both are positive if at least one is unsigned\n return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1;\n};\n\n/**\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\nLongPrototype.comp = LongPrototype.compare;\n\n/**\n * Negates this Long's value.\n * @this {!Long}\n * @returns {!Long} Negated Long\n */\nLongPrototype.negate = function negate() {\n if (!this.unsigned && this.eq(MIN_VALUE))\n return MIN_VALUE;\n return this.not().add(ONE);\n};\n\n/**\n * Negates this Long's value. This is an alias of {@link Long#negate}.\n * @function\n * @returns {!Long} Negated Long\n */\nLongPrototype.neg = LongPrototype.negate;\n\n/**\n * Returns the sum of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} addend Addend\n * @returns {!Long} Sum\n */\nLongPrototype.add = function add(addend) {\n if (!isLong(addend))\n addend = fromValue(addend);\n\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\n\n var a48 = this.high >>> 16;\n var a32 = this.high & 0xFFFF;\n var a16 = this.low >>> 16;\n var a00 = this.low & 0xFFFF;\n\n var b48 = addend.high >>> 16;\n var b32 = addend.high & 0xFFFF;\n var b16 = addend.low >>> 16;\n var b00 = addend.low & 0xFFFF;\n\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 + b00;\n c16 += c00 >>> 16;\n c00 &= 0xFFFF;\n c16 += a16 + b16;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c32 += a32 + b32;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c48 += a48 + b48;\n c48 &= 0xFFFF;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\n};\n\n/**\n * Returns the difference of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\nLongPrototype.subtract = function subtract(subtrahend) {\n if (!isLong(subtrahend))\n subtrahend = fromValue(subtrahend);\n return this.add(subtrahend.neg());\n};\n\n/**\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\n * @function\n * @param {!Long|number|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\nLongPrototype.sub = LongPrototype.subtract;\n\n/**\n * Returns the product of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} multiplier Multiplier\n * @returns {!Long} Product\n */\nLongPrototype.multiply = function multiply(multiplier) {\n if (this.isZero())\n return this;\n if (!isLong(multiplier))\n multiplier = fromValue(multiplier);\n\n // use wasm support if present\n if (wasm) {\n var low = wasm[\"mul\"](this.low,\n this.high,\n multiplier.low,\n multiplier.high);\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n\n if (multiplier.isZero())\n return this.unsigned ? UZERO : ZERO;\n if (this.eq(MIN_VALUE))\n return multiplier.isOdd() ? MIN_VALUE : ZERO;\n if (multiplier.eq(MIN_VALUE))\n return this.isOdd() ? MIN_VALUE : ZERO;\n\n if (this.isNegative()) {\n if (multiplier.isNegative())\n return this.neg().mul(multiplier.neg());\n else\n return this.neg().mul(multiplier).neg();\n } else if (multiplier.isNegative())\n return this.mul(multiplier.neg()).neg();\n\n // If both longs are small, use float multiplication\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\n return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\n\n // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\n // We can skip products that would overflow.\n\n var a48 = this.high >>> 16;\n var a32 = this.high & 0xFFFF;\n var a16 = this.low >>> 16;\n var a00 = this.low & 0xFFFF;\n\n var b48 = multiplier.high >>> 16;\n var b32 = multiplier.high & 0xFFFF;\n var b16 = multiplier.low >>> 16;\n var b00 = multiplier.low & 0xFFFF;\n\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 * b00;\n c16 += c00 >>> 16;\n c00 &= 0xFFFF;\n c16 += a16 * b00;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c16 += a00 * b16;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c32 += a32 * b00;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c32 += a16 * b16;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c32 += a00 * b32;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\n c48 &= 0xFFFF;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\n};\n\n/**\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\n * @function\n * @param {!Long|number|string} multiplier Multiplier\n * @returns {!Long} Product\n */\nLongPrototype.mul = LongPrototype.multiply;\n\n/**\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\n * unsigned if this Long is unsigned.\n * @this {!Long}\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Quotient\n */\nLongPrototype.divide = function divide(divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n if (divisor.isZero())\n throw Error('division by zero');\n\n // use wasm support if present\n if (wasm) {\n // guard against signed division overflow: the largest\n // negative number / -1 would be 1 larger than the largest\n // positive number, due to two's complement.\n if (!this.unsigned &&\n this.high === -0x80000000 &&\n divisor.low === -1 && divisor.high === -1) {\n // be consistent with non-wasm code path\n return this;\n }\n var low = (this.unsigned ? wasm[\"div_u\"] : wasm[\"div_s\"])(\n this.low,\n this.high,\n divisor.low,\n divisor.high\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n\n if (this.isZero())\n return this.unsigned ? UZERO : ZERO;\n var approx, rem, res;\n if (!this.unsigned) {\n // This section is only relevant for signed longs and is derived from the\n // closure library as a whole.\n if (this.eq(MIN_VALUE)) {\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\n return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE\n else if (divisor.eq(MIN_VALUE))\n return ONE;\n else {\n // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\n var halfThis = this.shr(1);\n approx = halfThis.div(divisor).shl(1);\n if (approx.eq(ZERO)) {\n return divisor.isNegative() ? ONE : NEG_ONE;\n } else {\n rem = this.sub(divisor.mul(approx));\n res = approx.add(rem.div(divisor));\n return res;\n }\n }\n } else if (divisor.eq(MIN_VALUE))\n return this.unsigned ? UZERO : ZERO;\n if (this.isNegative()) {\n if (divisor.isNegative())\n return this.neg().div(divisor.neg());\n return this.neg().div(divisor).neg();\n } else if (divisor.isNegative())\n return this.div(divisor.neg()).neg();\n res = ZERO;\n } else {\n // The algorithm below has not been made for unsigned longs. It's therefore\n // required to take special care of the MSB prior to running it.\n if (!divisor.unsigned)\n divisor = divisor.toUnsigned();\n if (divisor.gt(this))\n return UZERO;\n if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true\n return UONE;\n res = UZERO;\n }\n\n // Repeat the following until the remainder is less than other: find a\n // floating-point that approximates remainder / other *from below*, add this\n // into the result, and subtract it from the remainder. It is critical that\n // the approximate value is less than or equal to the real value so that the\n // remainder never becomes negative.\n rem = this;\n while (rem.gte(divisor)) {\n // Approximate the result of division. This may be a little greater or\n // smaller than the actual value.\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\n\n // We will tweak the approximate result by changing it in the 48-th digit or\n // the smallest non-fractional digit, whichever is larger.\n var log2 = Math.ceil(Math.log(approx) / Math.LN2),\n delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48),\n\n // Decrease the approximation until it is smaller than the remainder. Note\n // that if it is too large, the product overflows and is negative.\n approxRes = fromNumber(approx),\n approxRem = approxRes.mul(divisor);\n while (approxRem.isNegative() || approxRem.gt(rem)) {\n approx -= delta;\n approxRes = fromNumber(approx, this.unsigned);\n approxRem = approxRes.mul(divisor);\n }\n\n // We know the answer can't be zero... and actually, zero would cause\n // infinite recursion since we would make no progress.\n if (approxRes.isZero())\n approxRes = ONE;\n\n res = res.add(approxRes);\n rem = rem.sub(approxRem);\n }\n return res;\n};\n\n/**\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Quotient\n */\nLongPrototype.div = LongPrototype.divide;\n\n/**\n * Returns this Long modulo the specified.\n * @this {!Long}\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\nLongPrototype.modulo = function modulo(divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n\n // use wasm support if present\n if (wasm) {\n var low = (this.unsigned ? wasm[\"rem_u\"] : wasm[\"rem_s\"])(\n this.low,\n this.high,\n divisor.low,\n divisor.high\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n\n return this.sub(this.div(divisor).mul(divisor));\n};\n\n/**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\nLongPrototype.mod = LongPrototype.modulo;\n\n/**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\nLongPrototype.rem = LongPrototype.modulo;\n\n/**\n * Returns the bitwise NOT of this Long.\n * @this {!Long}\n * @returns {!Long}\n */\nLongPrototype.not = function not() {\n return fromBits(~this.low, ~this.high, this.unsigned);\n};\n\n/**\n * Returns count leading zeros of this Long.\n * @this {!Long}\n * @returns {!number}\n */\nLongPrototype.countLeadingZeros = function countLeadingZeros() {\n return this.high ? Math.clz32(this.high) : Math.clz32(this.low) + 32;\n};\n\n/**\n * Returns count leading zeros. This is an alias of {@link Long#countLeadingZeros}.\n * @function\n * @param {!Long}\n * @returns {!number}\n */\nLongPrototype.clz = LongPrototype.countLeadingZeros;\n\n/**\n * Returns count trailing zeros of this Long.\n * @this {!Long}\n * @returns {!number}\n */\nLongPrototype.countTrailingZeros = function countTrailingZeros() {\n return this.low ? ctz32(this.low) : ctz32(this.high) + 32;\n};\n\n/**\n * Returns count trailing zeros. This is an alias of {@link Long#countTrailingZeros}.\n * @function\n * @param {!Long}\n * @returns {!number}\n */\nLongPrototype.ctz = LongPrototype.countTrailingZeros;\n\n/**\n * Returns the bitwise AND of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nLongPrototype.and = function and(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\n};\n\n/**\n * Returns the bitwise OR of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nLongPrototype.or = function or(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\n};\n\n/**\n * Returns the bitwise XOR of this Long and the given one.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nLongPrototype.xor = function xor(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\n};\n\n/**\n * Returns this Long with bits shifted to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shiftLeft = function shiftLeft(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n else if (numBits < 32)\n return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);\n else\n return fromBits(0, this.low << (numBits - 32), this.unsigned);\n};\n\n/**\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shl = LongPrototype.shiftLeft;\n\n/**\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shiftRight = function shiftRight(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n else if (numBits < 32)\n return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);\n else\n return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);\n};\n\n/**\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shr = LongPrototype.shiftRight;\n\n/**\n * Returns this Long with bits logically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits < 32) return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >>> numBits, this.unsigned);\n if (numBits === 32) return fromBits(this.high, 0, this.unsigned);\n return fromBits(this.high >>> (numBits - 32), 0, this.unsigned);\n};\n\n/**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shru = LongPrototype.shiftRightUnsigned;\n\n/**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shr_u = LongPrototype.shiftRightUnsigned;\n\n/**\n * Returns this Long with bits rotated to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotateLeft = function rotateLeft(numBits) {\n var b;\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = (32 - numBits);\n return fromBits(((this.low << numBits) | (this.high >>> b)), ((this.high << numBits) | (this.low >>> b)), this.unsigned);\n }\n numBits -= 32;\n b = (32 - numBits);\n return fromBits(((this.high << numBits) | (this.low >>> b)), ((this.low << numBits) | (this.high >>> b)), this.unsigned);\n}\n/**\n * Returns this Long with bits rotated to the left by the given amount. This is an alias of {@link Long#rotateLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotl = LongPrototype.rotateLeft;\n\n/**\n * Returns this Long with bits rotated to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotateRight = function rotateRight(numBits) {\n var b;\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = (32 - numBits);\n return fromBits(((this.high << b) | (this.low >>> numBits)), ((this.low << b) | (this.high >>> numBits)), this.unsigned);\n }\n numBits -= 32;\n b = (32 - numBits);\n return fromBits(((this.low << b) | (this.high >>> numBits)), ((this.high << b) | (this.low >>> numBits)), this.unsigned);\n}\n/**\n * Returns this Long with bits rotated to the right by the given amount. This is an alias of {@link Long#rotateRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotr = LongPrototype.rotateRight;\n\n/**\n * Converts this Long to signed.\n * @this {!Long}\n * @returns {!Long} Signed long\n */\nLongPrototype.toSigned = function toSigned() {\n if (!this.unsigned)\n return this;\n return fromBits(this.low, this.high, false);\n};\n\n/**\n * Converts this Long to unsigned.\n * @this {!Long}\n * @returns {!Long} Unsigned long\n */\nLongPrototype.toUnsigned = function toUnsigned() {\n if (this.unsigned)\n return this;\n return fromBits(this.low, this.high, true);\n};\n\n/**\n * Converts this Long to its byte representation.\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @this {!Long}\n * @returns {!Array.} Byte representation\n */\nLongPrototype.toBytes = function toBytes(le) {\n return le ? this.toBytesLE() : this.toBytesBE();\n};\n\n/**\n * Converts this Long to its little endian byte representation.\n * @this {!Long}\n * @returns {!Array.} Little endian byte representation\n */\nLongPrototype.toBytesLE = function toBytesLE() {\n var hi = this.high,\n lo = this.low;\n return [\n lo & 0xff,\n lo >>> 8 & 0xff,\n lo >>> 16 & 0xff,\n lo >>> 24,\n hi & 0xff,\n hi >>> 8 & 0xff,\n hi >>> 16 & 0xff,\n hi >>> 24\n ];\n};\n\n/**\n * Converts this Long to its big endian byte representation.\n * @this {!Long}\n * @returns {!Array.} Big endian byte representation\n */\nLongPrototype.toBytesBE = function toBytesBE() {\n var hi = this.high,\n lo = this.low;\n return [\n hi >>> 24,\n hi >>> 16 & 0xff,\n hi >>> 8 & 0xff,\n hi & 0xff,\n lo >>> 24,\n lo >>> 16 & 0xff,\n lo >>> 8 & 0xff,\n lo & 0xff\n ];\n};\n\n/**\n * Creates a Long from its byte representation.\n * @param {!Array.} bytes Byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @returns {Long} The corresponding Long value\n */\nLong.fromBytes = function fromBytes(bytes, unsigned, le) {\n return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);\n};\n\n/**\n * Creates a Long from its little endian byte representation.\n * @param {!Array.} bytes Little endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\nLong.fromBytesLE = function fromBytesLE(bytes, unsigned) {\n return new Long(\n bytes[0] |\n bytes[1] << 8 |\n bytes[2] << 16 |\n bytes[3] << 24,\n bytes[4] |\n bytes[5] << 8 |\n bytes[6] << 16 |\n bytes[7] << 24,\n unsigned\n );\n};\n\n/**\n * Creates a Long from its big endian byte representation.\n * @param {!Array.} bytes Big endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\nLong.fromBytesBE = function fromBytesBE(bytes, unsigned) {\n return new Long(\n bytes[4] << 24 |\n bytes[5] << 16 |\n bytes[6] << 8 |\n bytes[7],\n bytes[0] << 24 |\n bytes[1] << 16 |\n bytes[2] << 8 |\n bytes[3],\n unsigned\n );\n};\n\nexport default Long;\n", "/* eslint-disable */\nimport Long from \"long\";\nimport _m0 from \"protobufjs/minimal\";\nimport { Color3 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBAvatarShape() {\n return {\n id: \"\",\n name: undefined,\n bodyShape: undefined,\n skinColor: undefined,\n hairColor: undefined,\n eyeColor: undefined,\n expressionTriggerId: undefined,\n expressionTriggerTimestamp: undefined,\n talking: undefined,\n wearables: [],\n emotes: [],\n };\n}\n/**\n * @public\n */\nexport var PBAvatarShape;\n(function (PBAvatarShape) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.id !== \"\") {\n writer.uint32(10).string(message.id);\n }\n if (message.name !== undefined) {\n writer.uint32(18).string(message.name);\n }\n if (message.bodyShape !== undefined) {\n writer.uint32(26).string(message.bodyShape);\n }\n if (message.skinColor !== undefined) {\n Color3.encode(message.skinColor, writer.uint32(34).fork()).ldelim();\n }\n if (message.hairColor !== undefined) {\n Color3.encode(message.hairColor, writer.uint32(42).fork()).ldelim();\n }\n if (message.eyeColor !== undefined) {\n Color3.encode(message.eyeColor, writer.uint32(50).fork()).ldelim();\n }\n if (message.expressionTriggerId !== undefined) {\n writer.uint32(58).string(message.expressionTriggerId);\n }\n if (message.expressionTriggerTimestamp !== undefined) {\n writer.uint32(64).int64(message.expressionTriggerTimestamp);\n }\n if (message.talking !== undefined) {\n writer.uint32(72).bool(message.talking);\n }\n for (const v of message.wearables) {\n writer.uint32(82).string(v);\n }\n for (const v of message.emotes) {\n writer.uint32(90).string(v);\n }\n return writer;\n }\n PBAvatarShape.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBAvatarShape();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.id = reader.string();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.name = reader.string();\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.bodyShape = reader.string();\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.skinColor = Color3.decode(reader, reader.uint32());\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.hairColor = Color3.decode(reader, reader.uint32());\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.eyeColor = Color3.decode(reader, reader.uint32());\n continue;\n case 7:\n if (tag !== 58) {\n break;\n }\n message.expressionTriggerId = reader.string();\n continue;\n case 8:\n if (tag !== 64) {\n break;\n }\n message.expressionTriggerTimestamp = longToNumber(reader.int64());\n continue;\n case 9:\n if (tag !== 72) {\n break;\n }\n message.talking = reader.bool();\n continue;\n case 10:\n if (tag !== 82) {\n break;\n }\n message.wearables.push(reader.string());\n continue;\n case 11:\n if (tag !== 90) {\n break;\n }\n message.emotes.push(reader.string());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBAvatarShape.decode = decode;\n})(PBAvatarShape || (PBAvatarShape = {}));\nconst tsProtoGlobalThis = (() => {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw \"Unable to locate global object\";\n})();\nfunction longToNumber(long) {\n if (long.gt(Number.MAX_SAFE_INTEGER)) {\n throw new tsProtoGlobalThis.Error(\"Value is larger than Number.MAX_SAFE_INTEGER\");\n }\n return long.toNumber();\n}\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long;\n _m0.configure();\n}\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.common\";\nfunction createBaseColor3() {\n return { r: 0, g: 0, b: 0 };\n}\n/**\n * @public\n */\nexport var Color3;\n(function (Color3) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.r !== 0) {\n writer.uint32(13).float(message.r);\n }\n if (message.g !== 0) {\n writer.uint32(21).float(message.g);\n }\n if (message.b !== 0) {\n writer.uint32(29).float(message.b);\n }\n return writer;\n }\n Color3.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseColor3();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.r = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.g = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.b = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Color3.decode = decode;\n})(Color3 || (Color3 = {}));\nfunction createBaseColor4() {\n return { r: 0, g: 0, b: 0, a: 0 };\n}\n/**\n * @public\n */\nexport var Color4;\n(function (Color4) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.r !== 0) {\n writer.uint32(13).float(message.r);\n }\n if (message.g !== 0) {\n writer.uint32(21).float(message.g);\n }\n if (message.b !== 0) {\n writer.uint32(29).float(message.b);\n }\n if (message.a !== 0) {\n writer.uint32(37).float(message.a);\n }\n return writer;\n }\n Color4.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseColor4();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.r = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.g = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.b = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.a = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Color4.decode = decode;\n})(Color4 || (Color4 = {}));\n", "import { PBAvatarShape } from './pb/decentraland/sdk/components/avatar_shape.gen';\n/**\n * @internal\n */\nexport const AvatarShapeSchema = {\n COMPONENT_ID: 1080,\n serialize(value, builder) {\n const writer = PBAvatarShape.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBAvatarShape.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBAvatarShape.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBAvatarShape\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form.\n * Only the values below and the (BM_X | BM_Y) combination are valid.\n */\n/**\n * @public\n */\nexport var BillboardMode;\n(function (BillboardMode) {\n BillboardMode[BillboardMode[\"BM_NONE\"] = 0] = \"BM_NONE\";\n BillboardMode[BillboardMode[\"BM_X\"] = 1] = \"BM_X\";\n BillboardMode[BillboardMode[\"BM_Y\"] = 2] = \"BM_Y\";\n BillboardMode[BillboardMode[\"BM_Z\"] = 4] = \"BM_Z\";\n /** BM_ALL - bitwise combination BM_X | BM_Y | BM_Z */\n BillboardMode[BillboardMode[\"BM_ALL\"] = 7] = \"BM_ALL\";\n})(BillboardMode || (BillboardMode = {}));\nfunction createBasePBBillboard() {\n return { billboardMode: undefined };\n}\n/**\n * @public\n */\nexport var PBBillboard;\n(function (PBBillboard) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.billboardMode !== undefined) {\n writer.uint32(8).int32(message.billboardMode);\n }\n return writer;\n }\n PBBillboard.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBBillboard();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.billboardMode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBBillboard.decode = decode;\n})(PBBillboard || (PBBillboard = {}));\n", "import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';\n/**\n * @internal\n */\nexport const BillboardSchema = {\n COMPONENT_ID: 1090,\n serialize(value, builder) {\n const writer = PBBillboard.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBBillboard.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBBillboard.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBBillboard\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBCameraMode() {\n return { mode: 0 };\n}\n/**\n * @public\n */\nexport var PBCameraMode;\n(function (PBCameraMode) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.mode !== 0) {\n writer.uint32(8).int32(message.mode);\n }\n return writer;\n }\n PBCameraMode.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBCameraMode();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.mode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBCameraMode.decode = decode;\n})(PBCameraMode || (PBCameraMode = {}));\n", "import { PBCameraMode } from './pb/decentraland/sdk/components/camera_mode.gen';\n/**\n * @internal\n */\nexport const CameraModeSchema = {\n COMPONENT_ID: 1072,\n serialize(value, builder) {\n const writer = PBCameraMode.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBCameraMode.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBCameraMode.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBCameraMode\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Vector3 } from \"../../common/vectors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBCameraModeArea() {\n return { area: undefined, mode: 0 };\n}\n/**\n * @public\n */\nexport var PBCameraModeArea;\n(function (PBCameraModeArea) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.area !== undefined) {\n Vector3.encode(message.area, writer.uint32(10).fork()).ldelim();\n }\n if (message.mode !== 0) {\n writer.uint32(16).int32(message.mode);\n }\n return writer;\n }\n PBCameraModeArea.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBCameraModeArea();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.area = Vector3.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.mode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBCameraModeArea.decode = decode;\n})(PBCameraModeArea || (PBCameraModeArea = {}));\n", "import { PBCameraModeArea } from './pb/decentraland/sdk/components/camera_mode_area.gen';\n/**\n * @internal\n */\nexport const CameraModeAreaSchema = {\n COMPONENT_ID: 1071,\n serialize(value, builder) {\n const writer = PBCameraModeArea.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBCameraModeArea.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBCameraModeArea.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBCameraModeArea\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBEngineInfo() {\n return { frameNumber: 0, totalRuntime: 0, tickNumber: 0 };\n}\n/**\n * @public\n */\nexport var PBEngineInfo;\n(function (PBEngineInfo) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.frameNumber !== 0) {\n writer.uint32(8).uint32(message.frameNumber);\n }\n if (message.totalRuntime !== 0) {\n writer.uint32(21).float(message.totalRuntime);\n }\n if (message.tickNumber !== 0) {\n writer.uint32(24).uint32(message.tickNumber);\n }\n return writer;\n }\n PBEngineInfo.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBEngineInfo();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.frameNumber = reader.uint32();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.totalRuntime = reader.float();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.tickNumber = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBEngineInfo.decode = decode;\n})(PBEngineInfo || (PBEngineInfo = {}));\n", "import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';\n/**\n * @internal\n */\nexport const EngineInfoSchema = {\n COMPONENT_ID: 1048,\n serialize(value, builder) {\n const writer = PBEngineInfo.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBEngineInfo.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBEngineInfo.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBEngineInfo\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBGltfContainer() {\n return { src: \"\", visibleMeshesCollisionMask: undefined, invisibleMeshesCollisionMask: undefined };\n}\n/**\n * @public\n */\nexport var PBGltfContainer;\n(function (PBGltfContainer) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.src !== \"\") {\n writer.uint32(10).string(message.src);\n }\n if (message.visibleMeshesCollisionMask !== undefined) {\n writer.uint32(32).uint32(message.visibleMeshesCollisionMask);\n }\n if (message.invisibleMeshesCollisionMask !== undefined) {\n writer.uint32(40).uint32(message.invisibleMeshesCollisionMask);\n }\n return writer;\n }\n PBGltfContainer.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBGltfContainer();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.src = reader.string();\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.visibleMeshesCollisionMask = reader.uint32();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.invisibleMeshesCollisionMask = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBGltfContainer.decode = decode;\n})(PBGltfContainer || (PBGltfContainer = {}));\n", "import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';\n/**\n * @internal\n */\nexport const GltfContainerSchema = {\n COMPONENT_ID: 1041,\n serialize(value, builder) {\n const writer = PBGltfContainer.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBGltfContainer.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBGltfContainer.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBGltfContainer\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBGltfContainerLoadingState() {\n return { currentState: 0 };\n}\n/**\n * @public\n */\nexport var PBGltfContainerLoadingState;\n(function (PBGltfContainerLoadingState) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.currentState !== 0) {\n writer.uint32(8).int32(message.currentState);\n }\n return writer;\n }\n PBGltfContainerLoadingState.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBGltfContainerLoadingState();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.currentState = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBGltfContainerLoadingState.decode = decode;\n})(PBGltfContainerLoadingState || (PBGltfContainerLoadingState = {}));\n", "import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';\n/**\n * @internal\n */\nexport const GltfContainerLoadingStateSchema = {\n COMPONENT_ID: 1049,\n serialize(value, builder) {\n const writer = PBGltfContainerLoadingState.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBGltfContainerLoadingState.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBGltfContainerLoadingState.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBGltfContainerLoadingState\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color3, Color4 } from \"../../common/colors.gen\";\nimport { TextureUnion } from \"../../common/texture.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var MaterialTransparencyMode;\n(function (MaterialTransparencyMode) {\n MaterialTransparencyMode[MaterialTransparencyMode[\"MTM_OPAQUE\"] = 0] = \"MTM_OPAQUE\";\n MaterialTransparencyMode[MaterialTransparencyMode[\"MTM_ALPHA_TEST\"] = 1] = \"MTM_ALPHA_TEST\";\n MaterialTransparencyMode[MaterialTransparencyMode[\"MTM_ALPHA_BLEND\"] = 2] = \"MTM_ALPHA_BLEND\";\n MaterialTransparencyMode[MaterialTransparencyMode[\"MTM_ALPHA_TEST_AND_ALPHA_BLEND\"] = 3] = \"MTM_ALPHA_TEST_AND_ALPHA_BLEND\";\n MaterialTransparencyMode[MaterialTransparencyMode[\"MTM_AUTO\"] = 4] = \"MTM_AUTO\";\n})(MaterialTransparencyMode || (MaterialTransparencyMode = {}));\nfunction createBasePBMaterial() {\n return { material: undefined };\n}\n/**\n * @public\n */\nexport var PBMaterial;\n(function (PBMaterial) {\n function encode(message, writer = _m0.Writer.create()) {\n switch (message.material?.$case) {\n case \"unlit\":\n PBMaterial_UnlitMaterial.encode(message.material.unlit, writer.uint32(10).fork()).ldelim();\n break;\n case \"pbr\":\n PBMaterial_PbrMaterial.encode(message.material.pbr, writer.uint32(18).fork()).ldelim();\n break;\n }\n return writer;\n }\n PBMaterial.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMaterial();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.material = { $case: \"unlit\", unlit: PBMaterial_UnlitMaterial.decode(reader, reader.uint32()) };\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.material = { $case: \"pbr\", pbr: PBMaterial_PbrMaterial.decode(reader, reader.uint32()) };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMaterial.decode = decode;\n})(PBMaterial || (PBMaterial = {}));\nfunction createBasePBMaterial_UnlitMaterial() {\n return { texture: undefined, alphaTest: undefined, castShadows: undefined, diffuseColor: undefined };\n}\n/**\n * @public\n */\nexport var PBMaterial_UnlitMaterial;\n(function (PBMaterial_UnlitMaterial) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.texture !== undefined) {\n TextureUnion.encode(message.texture, writer.uint32(10).fork()).ldelim();\n }\n if (message.alphaTest !== undefined) {\n writer.uint32(21).float(message.alphaTest);\n }\n if (message.castShadows !== undefined) {\n writer.uint32(24).bool(message.castShadows);\n }\n if (message.diffuseColor !== undefined) {\n Color4.encode(message.diffuseColor, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n }\n PBMaterial_UnlitMaterial.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMaterial_UnlitMaterial();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.texture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.alphaTest = reader.float();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.castShadows = reader.bool();\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.diffuseColor = Color4.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMaterial_UnlitMaterial.decode = decode;\n})(PBMaterial_UnlitMaterial || (PBMaterial_UnlitMaterial = {}));\nfunction createBasePBMaterial_PbrMaterial() {\n return {\n texture: undefined,\n alphaTest: undefined,\n castShadows: undefined,\n alphaTexture: undefined,\n emissiveTexture: undefined,\n bumpTexture: undefined,\n albedoColor: undefined,\n emissiveColor: undefined,\n reflectivityColor: undefined,\n transparencyMode: undefined,\n metallic: undefined,\n roughness: undefined,\n specularIntensity: undefined,\n emissiveIntensity: undefined,\n directIntensity: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBMaterial_PbrMaterial;\n(function (PBMaterial_PbrMaterial) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.texture !== undefined) {\n TextureUnion.encode(message.texture, writer.uint32(10).fork()).ldelim();\n }\n if (message.alphaTest !== undefined) {\n writer.uint32(21).float(message.alphaTest);\n }\n if (message.castShadows !== undefined) {\n writer.uint32(24).bool(message.castShadows);\n }\n if (message.alphaTexture !== undefined) {\n TextureUnion.encode(message.alphaTexture, writer.uint32(34).fork()).ldelim();\n }\n if (message.emissiveTexture !== undefined) {\n TextureUnion.encode(message.emissiveTexture, writer.uint32(42).fork()).ldelim();\n }\n if (message.bumpTexture !== undefined) {\n TextureUnion.encode(message.bumpTexture, writer.uint32(50).fork()).ldelim();\n }\n if (message.albedoColor !== undefined) {\n Color4.encode(message.albedoColor, writer.uint32(58).fork()).ldelim();\n }\n if (message.emissiveColor !== undefined) {\n Color3.encode(message.emissiveColor, writer.uint32(66).fork()).ldelim();\n }\n if (message.reflectivityColor !== undefined) {\n Color3.encode(message.reflectivityColor, writer.uint32(74).fork()).ldelim();\n }\n if (message.transparencyMode !== undefined) {\n writer.uint32(80).int32(message.transparencyMode);\n }\n if (message.metallic !== undefined) {\n writer.uint32(93).float(message.metallic);\n }\n if (message.roughness !== undefined) {\n writer.uint32(101).float(message.roughness);\n }\n if (message.specularIntensity !== undefined) {\n writer.uint32(117).float(message.specularIntensity);\n }\n if (message.emissiveIntensity !== undefined) {\n writer.uint32(125).float(message.emissiveIntensity);\n }\n if (message.directIntensity !== undefined) {\n writer.uint32(133).float(message.directIntensity);\n }\n return writer;\n }\n PBMaterial_PbrMaterial.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMaterial_PbrMaterial();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.texture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.alphaTest = reader.float();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.castShadows = reader.bool();\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.alphaTexture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.emissiveTexture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.bumpTexture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 7:\n if (tag !== 58) {\n break;\n }\n message.albedoColor = Color4.decode(reader, reader.uint32());\n continue;\n case 8:\n if (tag !== 66) {\n break;\n }\n message.emissiveColor = Color3.decode(reader, reader.uint32());\n continue;\n case 9:\n if (tag !== 74) {\n break;\n }\n message.reflectivityColor = Color3.decode(reader, reader.uint32());\n continue;\n case 10:\n if (tag !== 80) {\n break;\n }\n message.transparencyMode = reader.int32();\n continue;\n case 11:\n if (tag !== 93) {\n break;\n }\n message.metallic = reader.float();\n continue;\n case 12:\n if (tag !== 101) {\n break;\n }\n message.roughness = reader.float();\n continue;\n case 14:\n if (tag !== 117) {\n break;\n }\n message.specularIntensity = reader.float();\n continue;\n case 15:\n if (tag !== 125) {\n break;\n }\n message.emissiveIntensity = reader.float();\n continue;\n case 16:\n if (tag !== 133) {\n break;\n }\n message.directIntensity = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMaterial_PbrMaterial.decode = decode;\n})(PBMaterial_PbrMaterial || (PBMaterial_PbrMaterial = {}));\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.common\";\n/**\n * @public\n */\nexport var TextureWrapMode;\n(function (TextureWrapMode) {\n TextureWrapMode[TextureWrapMode[\"TWM_REPEAT\"] = 0] = \"TWM_REPEAT\";\n TextureWrapMode[TextureWrapMode[\"TWM_CLAMP\"] = 1] = \"TWM_CLAMP\";\n TextureWrapMode[TextureWrapMode[\"TWM_MIRROR\"] = 2] = \"TWM_MIRROR\";\n})(TextureWrapMode || (TextureWrapMode = {}));\n/**\n * @public\n */\nexport var TextureFilterMode;\n(function (TextureFilterMode) {\n TextureFilterMode[TextureFilterMode[\"TFM_POINT\"] = 0] = \"TFM_POINT\";\n TextureFilterMode[TextureFilterMode[\"TFM_BILINEAR\"] = 1] = \"TFM_BILINEAR\";\n TextureFilterMode[TextureFilterMode[\"TFM_TRILINEAR\"] = 2] = \"TFM_TRILINEAR\";\n})(TextureFilterMode || (TextureFilterMode = {}));\nfunction createBaseTexture() {\n return { src: \"\", wrapMode: undefined, filterMode: undefined };\n}\n/**\n * @public\n */\nexport var Texture;\n(function (Texture) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.src !== \"\") {\n writer.uint32(10).string(message.src);\n }\n if (message.wrapMode !== undefined) {\n writer.uint32(16).int32(message.wrapMode);\n }\n if (message.filterMode !== undefined) {\n writer.uint32(24).int32(message.filterMode);\n }\n return writer;\n }\n Texture.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTexture();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.src = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.wrapMode = reader.int32();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.filterMode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Texture.decode = decode;\n})(Texture || (Texture = {}));\nfunction createBaseAvatarTexture() {\n return { userId: \"\", wrapMode: undefined, filterMode: undefined };\n}\n/**\n * @public\n */\nexport var AvatarTexture;\n(function (AvatarTexture) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.userId !== \"\") {\n writer.uint32(10).string(message.userId);\n }\n if (message.wrapMode !== undefined) {\n writer.uint32(16).int32(message.wrapMode);\n }\n if (message.filterMode !== undefined) {\n writer.uint32(24).int32(message.filterMode);\n }\n return writer;\n }\n AvatarTexture.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseAvatarTexture();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.userId = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.wrapMode = reader.int32();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.filterMode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n AvatarTexture.decode = decode;\n})(AvatarTexture || (AvatarTexture = {}));\nfunction createBaseVideoTexture() {\n return { videoPlayerEntity: 0, wrapMode: undefined, filterMode: undefined };\n}\n/**\n * @public\n */\nexport var VideoTexture;\n(function (VideoTexture) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.videoPlayerEntity !== 0) {\n writer.uint32(8).uint32(message.videoPlayerEntity);\n }\n if (message.wrapMode !== undefined) {\n writer.uint32(16).int32(message.wrapMode);\n }\n if (message.filterMode !== undefined) {\n writer.uint32(24).int32(message.filterMode);\n }\n return writer;\n }\n VideoTexture.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseVideoTexture();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.videoPlayerEntity = reader.uint32();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.wrapMode = reader.int32();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.filterMode = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n VideoTexture.decode = decode;\n})(VideoTexture || (VideoTexture = {}));\nfunction createBaseTextureUnion() {\n return { tex: undefined };\n}\n/**\n * @public\n */\nexport var TextureUnion;\n(function (TextureUnion) {\n function encode(message, writer = _m0.Writer.create()) {\n switch (message.tex?.$case) {\n case \"texture\":\n Texture.encode(message.tex.texture, writer.uint32(10).fork()).ldelim();\n break;\n case \"avatarTexture\":\n AvatarTexture.encode(message.tex.avatarTexture, writer.uint32(18).fork()).ldelim();\n break;\n case \"videoTexture\":\n VideoTexture.encode(message.tex.videoTexture, writer.uint32(26).fork()).ldelim();\n break;\n }\n return writer;\n }\n TextureUnion.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTextureUnion();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.tex = { $case: \"texture\", texture: Texture.decode(reader, reader.uint32()) };\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.tex = { $case: \"avatarTexture\", avatarTexture: AvatarTexture.decode(reader, reader.uint32()) };\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.tex = { $case: \"videoTexture\", videoTexture: VideoTexture.decode(reader, reader.uint32()) };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n TextureUnion.decode = decode;\n})(TextureUnion || (TextureUnion = {}));\n", "import { PBMaterial } from './pb/decentraland/sdk/components/material.gen';\n/**\n * @internal\n */\nexport const MaterialSchema = {\n COMPONENT_ID: 1017,\n serialize(value, builder) {\n const writer = PBMaterial.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBMaterial.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBMaterial.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBMaterial\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/** ColliderLayer determines the kind of collision to detect, in OR-able bit flag form. */\n/**\n * @public\n */\nexport var ColliderLayer;\n(function (ColliderLayer) {\n /** CL_NONE - no collisions */\n ColliderLayer[ColliderLayer[\"CL_NONE\"] = 0] = \"CL_NONE\";\n /** CL_POINTER - collisions with the player's pointer ray (e.g. mouse cursor hovering) */\n ColliderLayer[ColliderLayer[\"CL_POINTER\"] = 1] = \"CL_POINTER\";\n /** CL_PHYSICS - collision affecting your player's physics i.e. walls, floor, moving platfroms */\n ColliderLayer[ColliderLayer[\"CL_PHYSICS\"] = 2] = \"CL_PHYSICS\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED1\"] = 4] = \"CL_RESERVED1\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED2\"] = 8] = \"CL_RESERVED2\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED3\"] = 16] = \"CL_RESERVED3\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED4\"] = 32] = \"CL_RESERVED4\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED5\"] = 64] = \"CL_RESERVED5\";\n ColliderLayer[ColliderLayer[\"CL_RESERVED6\"] = 128] = \"CL_RESERVED6\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM1\"] = 256] = \"CL_CUSTOM1\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM2\"] = 512] = \"CL_CUSTOM2\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM3\"] = 1024] = \"CL_CUSTOM3\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM4\"] = 2048] = \"CL_CUSTOM4\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM5\"] = 4096] = \"CL_CUSTOM5\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM6\"] = 8192] = \"CL_CUSTOM6\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM7\"] = 16384] = \"CL_CUSTOM7\";\n ColliderLayer[ColliderLayer[\"CL_CUSTOM8\"] = 32768] = \"CL_CUSTOM8\";\n})(ColliderLayer || (ColliderLayer = {}));\nfunction createBasePBMeshCollider() {\n return { collisionMask: undefined, mesh: undefined };\n}\n/**\n * @public\n */\nexport var PBMeshCollider;\n(function (PBMeshCollider) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.collisionMask !== undefined) {\n writer.uint32(8).uint32(message.collisionMask);\n }\n switch (message.mesh?.$case) {\n case \"box\":\n PBMeshCollider_BoxMesh.encode(message.mesh.box, writer.uint32(18).fork()).ldelim();\n break;\n case \"sphere\":\n PBMeshCollider_SphereMesh.encode(message.mesh.sphere, writer.uint32(26).fork()).ldelim();\n break;\n case \"cylinder\":\n PBMeshCollider_CylinderMesh.encode(message.mesh.cylinder, writer.uint32(34).fork()).ldelim();\n break;\n case \"plane\":\n PBMeshCollider_PlaneMesh.encode(message.mesh.plane, writer.uint32(42).fork()).ldelim();\n break;\n }\n return writer;\n }\n PBMeshCollider.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshCollider();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.collisionMask = reader.uint32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.mesh = { $case: \"box\", box: PBMeshCollider_BoxMesh.decode(reader, reader.uint32()) };\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.mesh = { $case: \"sphere\", sphere: PBMeshCollider_SphereMesh.decode(reader, reader.uint32()) };\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.mesh = { $case: \"cylinder\", cylinder: PBMeshCollider_CylinderMesh.decode(reader, reader.uint32()) };\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.mesh = { $case: \"plane\", plane: PBMeshCollider_PlaneMesh.decode(reader, reader.uint32()) };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshCollider.decode = decode;\n})(PBMeshCollider || (PBMeshCollider = {}));\nfunction createBasePBMeshCollider_BoxMesh() {\n return {};\n}\n/**\n * @public\n */\nexport var PBMeshCollider_BoxMesh;\n(function (PBMeshCollider_BoxMesh) {\n function encode(_, writer = _m0.Writer.create()) {\n return writer;\n }\n PBMeshCollider_BoxMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshCollider_BoxMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshCollider_BoxMesh.decode = decode;\n})(PBMeshCollider_BoxMesh || (PBMeshCollider_BoxMesh = {}));\nfunction createBasePBMeshCollider_CylinderMesh() {\n return { radiusTop: undefined, radiusBottom: undefined };\n}\n/**\n * @public\n */\nexport var PBMeshCollider_CylinderMesh;\n(function (PBMeshCollider_CylinderMesh) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.radiusTop !== undefined) {\n writer.uint32(13).float(message.radiusTop);\n }\n if (message.radiusBottom !== undefined) {\n writer.uint32(21).float(message.radiusBottom);\n }\n return writer;\n }\n PBMeshCollider_CylinderMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshCollider_CylinderMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.radiusTop = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.radiusBottom = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshCollider_CylinderMesh.decode = decode;\n})(PBMeshCollider_CylinderMesh || (PBMeshCollider_CylinderMesh = {}));\nfunction createBasePBMeshCollider_PlaneMesh() {\n return {};\n}\n/**\n * @public\n */\nexport var PBMeshCollider_PlaneMesh;\n(function (PBMeshCollider_PlaneMesh) {\n function encode(_, writer = _m0.Writer.create()) {\n return writer;\n }\n PBMeshCollider_PlaneMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshCollider_PlaneMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshCollider_PlaneMesh.decode = decode;\n})(PBMeshCollider_PlaneMesh || (PBMeshCollider_PlaneMesh = {}));\nfunction createBasePBMeshCollider_SphereMesh() {\n return {};\n}\n/**\n * @public\n */\nexport var PBMeshCollider_SphereMesh;\n(function (PBMeshCollider_SphereMesh) {\n function encode(_, writer = _m0.Writer.create()) {\n return writer;\n }\n PBMeshCollider_SphereMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshCollider_SphereMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshCollider_SphereMesh.decode = decode;\n})(PBMeshCollider_SphereMesh || (PBMeshCollider_SphereMesh = {}));\n", "import { PBMeshCollider } from './pb/decentraland/sdk/components/mesh_collider.gen';\n/**\n * @internal\n */\nexport const MeshColliderSchema = {\n COMPONENT_ID: 1019,\n serialize(value, builder) {\n const writer = PBMeshCollider.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBMeshCollider.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBMeshCollider.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBMeshCollider\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBMeshRenderer() {\n return { mesh: undefined };\n}\n/**\n * @public\n */\nexport var PBMeshRenderer;\n(function (PBMeshRenderer) {\n function encode(message, writer = _m0.Writer.create()) {\n switch (message.mesh?.$case) {\n case \"box\":\n PBMeshRenderer_BoxMesh.encode(message.mesh.box, writer.uint32(10).fork()).ldelim();\n break;\n case \"sphere\":\n PBMeshRenderer_SphereMesh.encode(message.mesh.sphere, writer.uint32(18).fork()).ldelim();\n break;\n case \"cylinder\":\n PBMeshRenderer_CylinderMesh.encode(message.mesh.cylinder, writer.uint32(26).fork()).ldelim();\n break;\n case \"plane\":\n PBMeshRenderer_PlaneMesh.encode(message.mesh.plane, writer.uint32(34).fork()).ldelim();\n break;\n }\n return writer;\n }\n PBMeshRenderer.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshRenderer();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.mesh = { $case: \"box\", box: PBMeshRenderer_BoxMesh.decode(reader, reader.uint32()) };\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.mesh = { $case: \"sphere\", sphere: PBMeshRenderer_SphereMesh.decode(reader, reader.uint32()) };\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.mesh = { $case: \"cylinder\", cylinder: PBMeshRenderer_CylinderMesh.decode(reader, reader.uint32()) };\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.mesh = { $case: \"plane\", plane: PBMeshRenderer_PlaneMesh.decode(reader, reader.uint32()) };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshRenderer.decode = decode;\n})(PBMeshRenderer || (PBMeshRenderer = {}));\nfunction createBasePBMeshRenderer_BoxMesh() {\n return { uvs: [] };\n}\n/**\n * @public\n */\nexport var PBMeshRenderer_BoxMesh;\n(function (PBMeshRenderer_BoxMesh) {\n function encode(message, writer = _m0.Writer.create()) {\n writer.uint32(10).fork();\n for (const v of message.uvs) {\n writer.float(v);\n }\n writer.ldelim();\n return writer;\n }\n PBMeshRenderer_BoxMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshRenderer_BoxMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag === 13) {\n message.uvs.push(reader.float());\n continue;\n }\n if (tag === 10) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.uvs.push(reader.float());\n }\n continue;\n }\n break;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshRenderer_BoxMesh.decode = decode;\n})(PBMeshRenderer_BoxMesh || (PBMeshRenderer_BoxMesh = {}));\nfunction createBasePBMeshRenderer_CylinderMesh() {\n return { radiusTop: undefined, radiusBottom: undefined };\n}\n/**\n * @public\n */\nexport var PBMeshRenderer_CylinderMesh;\n(function (PBMeshRenderer_CylinderMesh) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.radiusTop !== undefined) {\n writer.uint32(13).float(message.radiusTop);\n }\n if (message.radiusBottom !== undefined) {\n writer.uint32(21).float(message.radiusBottom);\n }\n return writer;\n }\n PBMeshRenderer_CylinderMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshRenderer_CylinderMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.radiusTop = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.radiusBottom = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshRenderer_CylinderMesh.decode = decode;\n})(PBMeshRenderer_CylinderMesh || (PBMeshRenderer_CylinderMesh = {}));\nfunction createBasePBMeshRenderer_PlaneMesh() {\n return { uvs: [] };\n}\n/**\n * @public\n */\nexport var PBMeshRenderer_PlaneMesh;\n(function (PBMeshRenderer_PlaneMesh) {\n function encode(message, writer = _m0.Writer.create()) {\n writer.uint32(10).fork();\n for (const v of message.uvs) {\n writer.float(v);\n }\n writer.ldelim();\n return writer;\n }\n PBMeshRenderer_PlaneMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshRenderer_PlaneMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag === 13) {\n message.uvs.push(reader.float());\n continue;\n }\n if (tag === 10) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.uvs.push(reader.float());\n }\n continue;\n }\n break;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshRenderer_PlaneMesh.decode = decode;\n})(PBMeshRenderer_PlaneMesh || (PBMeshRenderer_PlaneMesh = {}));\nfunction createBasePBMeshRenderer_SphereMesh() {\n return {};\n}\n/**\n * @public\n */\nexport var PBMeshRenderer_SphereMesh;\n(function (PBMeshRenderer_SphereMesh) {\n function encode(_, writer = _m0.Writer.create()) {\n return writer;\n }\n PBMeshRenderer_SphereMesh.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBMeshRenderer_SphereMesh();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBMeshRenderer_SphereMesh.decode = decode;\n})(PBMeshRenderer_SphereMesh || (PBMeshRenderer_SphereMesh = {}));\n", "import { PBMeshRenderer } from './pb/decentraland/sdk/components/mesh_renderer.gen';\n/**\n * @internal\n */\nexport const MeshRendererSchema = {\n COMPONENT_ID: 1018,\n serialize(value, builder) {\n const writer = PBMeshRenderer.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBMeshRenderer.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBMeshRenderer.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBMeshRenderer\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color3 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/** NftFrameType is a predefined framing style for the image. */\n/**\n * @public\n */\nexport var NftFrameType;\n(function (NftFrameType) {\n NftFrameType[NftFrameType[\"NFT_CLASSIC\"] = 0] = \"NFT_CLASSIC\";\n NftFrameType[NftFrameType[\"NFT_BAROQUE_ORNAMENT\"] = 1] = \"NFT_BAROQUE_ORNAMENT\";\n NftFrameType[NftFrameType[\"NFT_DIAMOND_ORNAMENT\"] = 2] = \"NFT_DIAMOND_ORNAMENT\";\n NftFrameType[NftFrameType[\"NFT_MINIMAL_WIDE\"] = 3] = \"NFT_MINIMAL_WIDE\";\n NftFrameType[NftFrameType[\"NFT_MINIMAL_GREY\"] = 4] = \"NFT_MINIMAL_GREY\";\n NftFrameType[NftFrameType[\"NFT_BLOCKY\"] = 5] = \"NFT_BLOCKY\";\n NftFrameType[NftFrameType[\"NFT_GOLD_EDGES\"] = 6] = \"NFT_GOLD_EDGES\";\n NftFrameType[NftFrameType[\"NFT_GOLD_CARVED\"] = 7] = \"NFT_GOLD_CARVED\";\n NftFrameType[NftFrameType[\"NFT_GOLD_WIDE\"] = 8] = \"NFT_GOLD_WIDE\";\n NftFrameType[NftFrameType[\"NFT_GOLD_ROUNDED\"] = 9] = \"NFT_GOLD_ROUNDED\";\n NftFrameType[NftFrameType[\"NFT_METAL_MEDIUM\"] = 10] = \"NFT_METAL_MEDIUM\";\n NftFrameType[NftFrameType[\"NFT_METAL_WIDE\"] = 11] = \"NFT_METAL_WIDE\";\n NftFrameType[NftFrameType[\"NFT_METAL_SLIM\"] = 12] = \"NFT_METAL_SLIM\";\n NftFrameType[NftFrameType[\"NFT_METAL_ROUNDED\"] = 13] = \"NFT_METAL_ROUNDED\";\n NftFrameType[NftFrameType[\"NFT_PINS\"] = 14] = \"NFT_PINS\";\n NftFrameType[NftFrameType[\"NFT_MINIMAL_BLACK\"] = 15] = \"NFT_MINIMAL_BLACK\";\n NftFrameType[NftFrameType[\"NFT_MINIMAL_WHITE\"] = 16] = \"NFT_MINIMAL_WHITE\";\n NftFrameType[NftFrameType[\"NFT_TAPE\"] = 17] = \"NFT_TAPE\";\n NftFrameType[NftFrameType[\"NFT_WOOD_SLIM\"] = 18] = \"NFT_WOOD_SLIM\";\n NftFrameType[NftFrameType[\"NFT_WOOD_WIDE\"] = 19] = \"NFT_WOOD_WIDE\";\n NftFrameType[NftFrameType[\"NFT_WOOD_TWIGS\"] = 20] = \"NFT_WOOD_TWIGS\";\n NftFrameType[NftFrameType[\"NFT_CANVAS\"] = 21] = \"NFT_CANVAS\";\n NftFrameType[NftFrameType[\"NFT_NONE\"] = 22] = \"NFT_NONE\";\n})(NftFrameType || (NftFrameType = {}));\nfunction createBasePBNftShape() {\n return { urn: \"\", style: undefined, color: undefined };\n}\n/**\n * @public\n */\nexport var PBNftShape;\n(function (PBNftShape) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.urn !== \"\") {\n writer.uint32(10).string(message.urn);\n }\n if (message.style !== undefined) {\n writer.uint32(16).int32(message.style);\n }\n if (message.color !== undefined) {\n Color3.encode(message.color, writer.uint32(26).fork()).ldelim();\n }\n return writer;\n }\n PBNftShape.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBNftShape();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.urn = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.style = reader.int32();\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.color = Color3.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBNftShape.decode = decode;\n})(PBNftShape || (PBNftShape = {}));\n", "import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';\n/**\n * @internal\n */\nexport const NftShapeSchema = {\n COMPONENT_ID: 1040,\n serialize(value, builder) {\n const writer = PBNftShape.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBNftShape.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBNftShape.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBNftShape\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBPointerEvents() {\n return { pointerEvents: [] };\n}\n/**\n * @public\n */\nexport var PBPointerEvents;\n(function (PBPointerEvents) {\n function encode(message, writer = _m0.Writer.create()) {\n for (const v of message.pointerEvents) {\n PBPointerEvents_Entry.encode(v, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n }\n PBPointerEvents.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBPointerEvents();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.pointerEvents.push(PBPointerEvents_Entry.decode(reader, reader.uint32()));\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBPointerEvents.decode = decode;\n})(PBPointerEvents || (PBPointerEvents = {}));\nfunction createBasePBPointerEvents_Info() {\n return { button: undefined, hoverText: undefined, maxDistance: undefined, showFeedback: undefined };\n}\n/**\n * @public\n */\nexport var PBPointerEvents_Info;\n(function (PBPointerEvents_Info) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.button !== undefined) {\n writer.uint32(8).int32(message.button);\n }\n if (message.hoverText !== undefined) {\n writer.uint32(18).string(message.hoverText);\n }\n if (message.maxDistance !== undefined) {\n writer.uint32(29).float(message.maxDistance);\n }\n if (message.showFeedback !== undefined) {\n writer.uint32(32).bool(message.showFeedback);\n }\n return writer;\n }\n PBPointerEvents_Info.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBPointerEvents_Info();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.button = reader.int32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.hoverText = reader.string();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.maxDistance = reader.float();\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.showFeedback = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBPointerEvents_Info.decode = decode;\n})(PBPointerEvents_Info || (PBPointerEvents_Info = {}));\nfunction createBasePBPointerEvents_Entry() {\n return { eventType: 0, eventInfo: undefined };\n}\n/**\n * @public\n */\nexport var PBPointerEvents_Entry;\n(function (PBPointerEvents_Entry) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.eventType !== 0) {\n writer.uint32(8).int32(message.eventType);\n }\n if (message.eventInfo !== undefined) {\n PBPointerEvents_Info.encode(message.eventInfo, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n PBPointerEvents_Entry.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBPointerEvents_Entry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.eventType = reader.int32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.eventInfo = PBPointerEvents_Info.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBPointerEvents_Entry.decode = decode;\n})(PBPointerEvents_Entry || (PBPointerEvents_Entry = {}));\n", "import { PBPointerEvents } from './pb/decentraland/sdk/components/pointer_events.gen';\n/**\n * @internal\n */\nexport const PointerEventsSchema = {\n COMPONENT_ID: 1062,\n serialize(value, builder) {\n const writer = PBPointerEvents.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBPointerEvents.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBPointerEvents.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBPointerEvents\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { RaycastHit } from \"./common/raycast_hit.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBPointerEventsResult() {\n return { button: 0, hit: undefined, state: 0, timestamp: 0, analog: undefined, tickNumber: 0 };\n}\n/**\n * @public\n */\nexport var PBPointerEventsResult;\n(function (PBPointerEventsResult) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.button !== 0) {\n writer.uint32(8).int32(message.button);\n }\n if (message.hit !== undefined) {\n RaycastHit.encode(message.hit, writer.uint32(18).fork()).ldelim();\n }\n if (message.state !== 0) {\n writer.uint32(32).int32(message.state);\n }\n if (message.timestamp !== 0) {\n writer.uint32(40).uint32(message.timestamp);\n }\n if (message.analog !== undefined) {\n writer.uint32(53).float(message.analog);\n }\n if (message.tickNumber !== 0) {\n writer.uint32(56).uint32(message.tickNumber);\n }\n return writer;\n }\n PBPointerEventsResult.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBPointerEventsResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.button = reader.int32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.hit = RaycastHit.decode(reader, reader.uint32());\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.state = reader.int32();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.timestamp = reader.uint32();\n continue;\n case 6:\n if (tag !== 53) {\n break;\n }\n message.analog = reader.float();\n continue;\n case 7:\n if (tag !== 56) {\n break;\n }\n message.tickNumber = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBPointerEventsResult.decode = decode;\n})(PBPointerEventsResult || (PBPointerEventsResult = {}));\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Vector3 } from \"../../../common/vectors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components.common\";\nfunction createBaseRaycastHit() {\n return {\n position: undefined,\n globalOrigin: undefined,\n direction: undefined,\n normalHit: undefined,\n length: 0,\n meshName: undefined,\n entityId: undefined,\n };\n}\n/**\n * @public\n */\nexport var RaycastHit;\n(function (RaycastHit) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.position !== undefined) {\n Vector3.encode(message.position, writer.uint32(10).fork()).ldelim();\n }\n if (message.globalOrigin !== undefined) {\n Vector3.encode(message.globalOrigin, writer.uint32(18).fork()).ldelim();\n }\n if (message.direction !== undefined) {\n Vector3.encode(message.direction, writer.uint32(26).fork()).ldelim();\n }\n if (message.normalHit !== undefined) {\n Vector3.encode(message.normalHit, writer.uint32(34).fork()).ldelim();\n }\n if (message.length !== 0) {\n writer.uint32(45).float(message.length);\n }\n if (message.meshName !== undefined) {\n writer.uint32(50).string(message.meshName);\n }\n if (message.entityId !== undefined) {\n writer.uint32(56).uint32(message.entityId);\n }\n return writer;\n }\n RaycastHit.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRaycastHit();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.position = Vector3.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.globalOrigin = Vector3.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.direction = Vector3.decode(reader, reader.uint32());\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.normalHit = Vector3.decode(reader, reader.uint32());\n continue;\n case 5:\n if (tag !== 45) {\n break;\n }\n message.length = reader.float();\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.meshName = reader.string();\n continue;\n case 7:\n if (tag !== 56) {\n break;\n }\n message.entityId = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n RaycastHit.decode = decode;\n})(RaycastHit || (RaycastHit = {}));\n", "import { PBPointerEventsResult } from './pb/decentraland/sdk/components/pointer_events_result.gen';\n/**\n * @internal\n */\nexport const PointerEventsResultSchema = {\n COMPONENT_ID: 1063,\n serialize(value, builder) {\n const writer = PBPointerEventsResult.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBPointerEventsResult.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBPointerEventsResult.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBPointerEventsResult\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBPointerLock() {\n return { isPointerLocked: false };\n}\n/**\n * @public\n */\nexport var PBPointerLock;\n(function (PBPointerLock) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.isPointerLocked === true) {\n writer.uint32(8).bool(message.isPointerLocked);\n }\n return writer;\n }\n PBPointerLock.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBPointerLock();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.isPointerLocked = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBPointerLock.decode = decode;\n})(PBPointerLock || (PBPointerLock = {}));\n", "import { PBPointerLock } from './pb/decentraland/sdk/components/pointer_lock.gen';\n/**\n * @internal\n */\nexport const PointerLockSchema = {\n COMPONENT_ID: 1074,\n serialize(value, builder) {\n const writer = PBPointerLock.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBPointerLock.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBPointerLock.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBPointerLock\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Vector3 } from \"../../common/vectors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/** RaycastQueryType indicates whether the ray should stop on the first collition, or continue. */\n/**\n * @public\n */\nexport var RaycastQueryType;\n(function (RaycastQueryType) {\n /** RQT_HIT_FIRST - Pick the first (not necessarily the closest) hit within the range */\n RaycastQueryType[RaycastQueryType[\"RQT_HIT_FIRST\"] = 0] = \"RQT_HIT_FIRST\";\n /** RQT_QUERY_ALL - Pick all hits within the range */\n RaycastQueryType[RaycastQueryType[\"RQT_QUERY_ALL\"] = 1] = \"RQT_QUERY_ALL\";\n /** RQT_NONE - Do not perform the raycast, only set the raycast result with empty hits */\n RaycastQueryType[RaycastQueryType[\"RQT_NONE\"] = 2] = \"RQT_NONE\";\n})(RaycastQueryType || (RaycastQueryType = {}));\nfunction createBasePBRaycast() {\n return {\n timestamp: undefined,\n originOffset: undefined,\n direction: undefined,\n maxDistance: 0,\n queryType: 0,\n continuous: undefined,\n collisionMask: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBRaycast;\n(function (PBRaycast) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.timestamp !== undefined) {\n writer.uint32(8).uint32(message.timestamp);\n }\n if (message.originOffset !== undefined) {\n Vector3.encode(message.originOffset, writer.uint32(18).fork()).ldelim();\n }\n switch (message.direction?.$case) {\n case \"localDirection\":\n Vector3.encode(message.direction.localDirection, writer.uint32(50).fork()).ldelim();\n break;\n case \"globalDirection\":\n Vector3.encode(message.direction.globalDirection, writer.uint32(26).fork()).ldelim();\n break;\n case \"globalTarget\":\n Vector3.encode(message.direction.globalTarget, writer.uint32(58).fork()).ldelim();\n break;\n case \"targetEntity\":\n writer.uint32(80).uint32(message.direction.targetEntity);\n break;\n }\n if (message.maxDistance !== 0) {\n writer.uint32(37).float(message.maxDistance);\n }\n if (message.queryType !== 0) {\n writer.uint32(40).int32(message.queryType);\n }\n if (message.continuous !== undefined) {\n writer.uint32(64).bool(message.continuous);\n }\n if (message.collisionMask !== undefined) {\n writer.uint32(72).uint32(message.collisionMask);\n }\n return writer;\n }\n PBRaycast.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBRaycast();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.timestamp = reader.uint32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.originOffset = Vector3.decode(reader, reader.uint32());\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.direction = { $case: \"localDirection\", localDirection: Vector3.decode(reader, reader.uint32()) };\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.direction = { $case: \"globalDirection\", globalDirection: Vector3.decode(reader, reader.uint32()) };\n continue;\n case 7:\n if (tag !== 58) {\n break;\n }\n message.direction = { $case: \"globalTarget\", globalTarget: Vector3.decode(reader, reader.uint32()) };\n continue;\n case 10:\n if (tag !== 80) {\n break;\n }\n message.direction = { $case: \"targetEntity\", targetEntity: reader.uint32() };\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.maxDistance = reader.float();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.queryType = reader.int32();\n continue;\n case 8:\n if (tag !== 64) {\n break;\n }\n message.continuous = reader.bool();\n continue;\n case 9:\n if (tag !== 72) {\n break;\n }\n message.collisionMask = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBRaycast.decode = decode;\n})(PBRaycast || (PBRaycast = {}));\n", "import { PBRaycast } from './pb/decentraland/sdk/components/raycast.gen';\n/**\n * @internal\n */\nexport const RaycastSchema = {\n COMPONENT_ID: 1067,\n serialize(value, builder) {\n const writer = PBRaycast.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBRaycast.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBRaycast.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBRaycast\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Vector3 } from \"../../common/vectors.gen\";\nimport { RaycastHit } from \"./common/raycast_hit.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBRaycastResult() {\n return { timestamp: undefined, globalOrigin: undefined, direction: undefined, hits: [], tickNumber: 0 };\n}\n/**\n * @public\n */\nexport var PBRaycastResult;\n(function (PBRaycastResult) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.timestamp !== undefined) {\n writer.uint32(8).uint32(message.timestamp);\n }\n if (message.globalOrigin !== undefined) {\n Vector3.encode(message.globalOrigin, writer.uint32(18).fork()).ldelim();\n }\n if (message.direction !== undefined) {\n Vector3.encode(message.direction, writer.uint32(26).fork()).ldelim();\n }\n for (const v of message.hits) {\n RaycastHit.encode(v, writer.uint32(34).fork()).ldelim();\n }\n if (message.tickNumber !== 0) {\n writer.uint32(40).uint32(message.tickNumber);\n }\n return writer;\n }\n PBRaycastResult.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBRaycastResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.timestamp = reader.uint32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.globalOrigin = Vector3.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.direction = Vector3.decode(reader, reader.uint32());\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.hits.push(RaycastHit.decode(reader, reader.uint32()));\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.tickNumber = reader.uint32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBRaycastResult.decode = decode;\n})(PBRaycastResult || (PBRaycastResult = {}));\n", "import { PBRaycastResult } from './pb/decentraland/sdk/components/raycast_result.gen';\n/**\n * @internal\n */\nexport const RaycastResultSchema = {\n COMPONENT_ID: 1068,\n serialize(value, builder) {\n const writer = PBRaycastResult.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBRaycastResult.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBRaycastResult.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBRaycastResult\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color3, Color4 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBTextShape() {\n return {\n text: \"\",\n font: undefined,\n fontSize: undefined,\n fontAutoSize: undefined,\n textAlign: undefined,\n width: undefined,\n height: undefined,\n paddingTop: undefined,\n paddingRight: undefined,\n paddingBottom: undefined,\n paddingLeft: undefined,\n lineSpacing: undefined,\n lineCount: undefined,\n textWrapping: undefined,\n shadowBlur: undefined,\n shadowOffsetX: undefined,\n shadowOffsetY: undefined,\n outlineWidth: undefined,\n shadowColor: undefined,\n outlineColor: undefined,\n textColor: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBTextShape;\n(function (PBTextShape) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.text !== \"\") {\n writer.uint32(10).string(message.text);\n }\n if (message.font !== undefined) {\n writer.uint32(16).int32(message.font);\n }\n if (message.fontSize !== undefined) {\n writer.uint32(29).float(message.fontSize);\n }\n if (message.fontAutoSize !== undefined) {\n writer.uint32(32).bool(message.fontAutoSize);\n }\n if (message.textAlign !== undefined) {\n writer.uint32(40).int32(message.textAlign);\n }\n if (message.width !== undefined) {\n writer.uint32(53).float(message.width);\n }\n if (message.height !== undefined) {\n writer.uint32(61).float(message.height);\n }\n if (message.paddingTop !== undefined) {\n writer.uint32(69).float(message.paddingTop);\n }\n if (message.paddingRight !== undefined) {\n writer.uint32(77).float(message.paddingRight);\n }\n if (message.paddingBottom !== undefined) {\n writer.uint32(85).float(message.paddingBottom);\n }\n if (message.paddingLeft !== undefined) {\n writer.uint32(93).float(message.paddingLeft);\n }\n if (message.lineSpacing !== undefined) {\n writer.uint32(101).float(message.lineSpacing);\n }\n if (message.lineCount !== undefined) {\n writer.uint32(104).int32(message.lineCount);\n }\n if (message.textWrapping !== undefined) {\n writer.uint32(112).bool(message.textWrapping);\n }\n if (message.shadowBlur !== undefined) {\n writer.uint32(125).float(message.shadowBlur);\n }\n if (message.shadowOffsetX !== undefined) {\n writer.uint32(133).float(message.shadowOffsetX);\n }\n if (message.shadowOffsetY !== undefined) {\n writer.uint32(141).float(message.shadowOffsetY);\n }\n if (message.outlineWidth !== undefined) {\n writer.uint32(149).float(message.outlineWidth);\n }\n if (message.shadowColor !== undefined) {\n Color3.encode(message.shadowColor, writer.uint32(154).fork()).ldelim();\n }\n if (message.outlineColor !== undefined) {\n Color3.encode(message.outlineColor, writer.uint32(162).fork()).ldelim();\n }\n if (message.textColor !== undefined) {\n Color4.encode(message.textColor, writer.uint32(170).fork()).ldelim();\n }\n return writer;\n }\n PBTextShape.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBTextShape();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.text = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.font = reader.int32();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.fontSize = reader.float();\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.fontAutoSize = reader.bool();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.textAlign = reader.int32();\n continue;\n case 6:\n if (tag !== 53) {\n break;\n }\n message.width = reader.float();\n continue;\n case 7:\n if (tag !== 61) {\n break;\n }\n message.height = reader.float();\n continue;\n case 8:\n if (tag !== 69) {\n break;\n }\n message.paddingTop = reader.float();\n continue;\n case 9:\n if (tag !== 77) {\n break;\n }\n message.paddingRight = reader.float();\n continue;\n case 10:\n if (tag !== 85) {\n break;\n }\n message.paddingBottom = reader.float();\n continue;\n case 11:\n if (tag !== 93) {\n break;\n }\n message.paddingLeft = reader.float();\n continue;\n case 12:\n if (tag !== 101) {\n break;\n }\n message.lineSpacing = reader.float();\n continue;\n case 13:\n if (tag !== 104) {\n break;\n }\n message.lineCount = reader.int32();\n continue;\n case 14:\n if (tag !== 112) {\n break;\n }\n message.textWrapping = reader.bool();\n continue;\n case 15:\n if (tag !== 125) {\n break;\n }\n message.shadowBlur = reader.float();\n continue;\n case 16:\n if (tag !== 133) {\n break;\n }\n message.shadowOffsetX = reader.float();\n continue;\n case 17:\n if (tag !== 141) {\n break;\n }\n message.shadowOffsetY = reader.float();\n continue;\n case 18:\n if (tag !== 149) {\n break;\n }\n message.outlineWidth = reader.float();\n continue;\n case 19:\n if (tag !== 154) {\n break;\n }\n message.shadowColor = Color3.decode(reader, reader.uint32());\n continue;\n case 20:\n if (tag !== 162) {\n break;\n }\n message.outlineColor = Color3.decode(reader, reader.uint32());\n continue;\n case 21:\n if (tag !== 170) {\n break;\n }\n message.textColor = Color4.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBTextShape.decode = decode;\n})(PBTextShape || (PBTextShape = {}));\n", "import { PBTextShape } from './pb/decentraland/sdk/components/text_shape.gen';\n/**\n * @internal\n */\nexport const TextShapeSchema = {\n COMPONENT_ID: 1030,\n serialize(value, builder) {\n const writer = PBTextShape.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBTextShape.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBTextShape.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBTextShape\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Quaternion, Vector3 } from \"../../common/vectors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * Implementation guidelines for these easing functions can be found\n * at https://github.com/ai/easings.net/blob/6fcd5f852a470bf1a7890e8178afa0f471d5f2ec/src/easings/easingsFunctions.ts\n */\n/**\n * @public\n */\nexport var EasingFunction;\n(function (EasingFunction) {\n /** EF_LINEAR - default */\n EasingFunction[EasingFunction[\"EF_LINEAR\"] = 0] = \"EF_LINEAR\";\n EasingFunction[EasingFunction[\"EF_EASEINQUAD\"] = 1] = \"EF_EASEINQUAD\";\n EasingFunction[EasingFunction[\"EF_EASEOUTQUAD\"] = 2] = \"EF_EASEOUTQUAD\";\n EasingFunction[EasingFunction[\"EF_EASEQUAD\"] = 3] = \"EF_EASEQUAD\";\n EasingFunction[EasingFunction[\"EF_EASEINSINE\"] = 4] = \"EF_EASEINSINE\";\n EasingFunction[EasingFunction[\"EF_EASEOUTSINE\"] = 5] = \"EF_EASEOUTSINE\";\n EasingFunction[EasingFunction[\"EF_EASESINE\"] = 6] = \"EF_EASESINE\";\n EasingFunction[EasingFunction[\"EF_EASEINEXPO\"] = 7] = \"EF_EASEINEXPO\";\n EasingFunction[EasingFunction[\"EF_EASEOUTEXPO\"] = 8] = \"EF_EASEOUTEXPO\";\n EasingFunction[EasingFunction[\"EF_EASEEXPO\"] = 9] = \"EF_EASEEXPO\";\n EasingFunction[EasingFunction[\"EF_EASEINELASTIC\"] = 10] = \"EF_EASEINELASTIC\";\n EasingFunction[EasingFunction[\"EF_EASEOUTELASTIC\"] = 11] = \"EF_EASEOUTELASTIC\";\n EasingFunction[EasingFunction[\"EF_EASEELASTIC\"] = 12] = \"EF_EASEELASTIC\";\n EasingFunction[EasingFunction[\"EF_EASEINBOUNCE\"] = 13] = \"EF_EASEINBOUNCE\";\n EasingFunction[EasingFunction[\"EF_EASEOUTBOUNCE\"] = 14] = \"EF_EASEOUTBOUNCE\";\n EasingFunction[EasingFunction[\"EF_EASEBOUNCE\"] = 15] = \"EF_EASEBOUNCE\";\n EasingFunction[EasingFunction[\"EF_EASEINCUBIC\"] = 16] = \"EF_EASEINCUBIC\";\n EasingFunction[EasingFunction[\"EF_EASEOUTCUBIC\"] = 17] = \"EF_EASEOUTCUBIC\";\n EasingFunction[EasingFunction[\"EF_EASECUBIC\"] = 18] = \"EF_EASECUBIC\";\n EasingFunction[EasingFunction[\"EF_EASEINQUART\"] = 19] = \"EF_EASEINQUART\";\n EasingFunction[EasingFunction[\"EF_EASEOUTQUART\"] = 20] = \"EF_EASEOUTQUART\";\n EasingFunction[EasingFunction[\"EF_EASEQUART\"] = 21] = \"EF_EASEQUART\";\n EasingFunction[EasingFunction[\"EF_EASEINQUINT\"] = 22] = \"EF_EASEINQUINT\";\n EasingFunction[EasingFunction[\"EF_EASEOUTQUINT\"] = 23] = \"EF_EASEOUTQUINT\";\n EasingFunction[EasingFunction[\"EF_EASEQUINT\"] = 24] = \"EF_EASEQUINT\";\n EasingFunction[EasingFunction[\"EF_EASEINCIRC\"] = 25] = \"EF_EASEINCIRC\";\n EasingFunction[EasingFunction[\"EF_EASEOUTCIRC\"] = 26] = \"EF_EASEOUTCIRC\";\n EasingFunction[EasingFunction[\"EF_EASECIRC\"] = 27] = \"EF_EASECIRC\";\n EasingFunction[EasingFunction[\"EF_EASEINBACK\"] = 28] = \"EF_EASEINBACK\";\n EasingFunction[EasingFunction[\"EF_EASEOUTBACK\"] = 29] = \"EF_EASEOUTBACK\";\n EasingFunction[EasingFunction[\"EF_EASEBACK\"] = 30] = \"EF_EASEBACK\";\n})(EasingFunction || (EasingFunction = {}));\nfunction createBasePBTween() {\n return { duration: 0, easingFunction: 0, mode: undefined, playing: undefined, currentTime: undefined };\n}\n/**\n * @public\n */\nexport var PBTween;\n(function (PBTween) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.duration !== 0) {\n writer.uint32(13).float(message.duration);\n }\n if (message.easingFunction !== 0) {\n writer.uint32(16).int32(message.easingFunction);\n }\n switch (message.mode?.$case) {\n case \"move\":\n Move.encode(message.mode.move, writer.uint32(26).fork()).ldelim();\n break;\n case \"rotate\":\n Rotate.encode(message.mode.rotate, writer.uint32(34).fork()).ldelim();\n break;\n case \"scale\":\n Scale.encode(message.mode.scale, writer.uint32(42).fork()).ldelim();\n break;\n }\n if (message.playing !== undefined) {\n writer.uint32(48).bool(message.playing);\n }\n if (message.currentTime !== undefined) {\n writer.uint32(61).float(message.currentTime);\n }\n return writer;\n }\n PBTween.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBTween();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.duration = reader.float();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.easingFunction = reader.int32();\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.mode = { $case: \"move\", move: Move.decode(reader, reader.uint32()) };\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.mode = { $case: \"rotate\", rotate: Rotate.decode(reader, reader.uint32()) };\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.mode = { $case: \"scale\", scale: Scale.decode(reader, reader.uint32()) };\n continue;\n case 6:\n if (tag !== 48) {\n break;\n }\n message.playing = reader.bool();\n continue;\n case 7:\n if (tag !== 61) {\n break;\n }\n message.currentTime = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBTween.decode = decode;\n})(PBTween || (PBTween = {}));\nfunction createBaseMove() {\n return { start: undefined, end: undefined, faceDirection: undefined };\n}\n/**\n * @public\n */\nexport var Move;\n(function (Move) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.start !== undefined) {\n Vector3.encode(message.start, writer.uint32(10).fork()).ldelim();\n }\n if (message.end !== undefined) {\n Vector3.encode(message.end, writer.uint32(18).fork()).ldelim();\n }\n if (message.faceDirection !== undefined) {\n writer.uint32(24).bool(message.faceDirection);\n }\n return writer;\n }\n Move.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMove();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.start = Vector3.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.end = Vector3.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.faceDirection = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Move.decode = decode;\n})(Move || (Move = {}));\nfunction createBaseRotate() {\n return { start: undefined, end: undefined };\n}\n/**\n * @public\n */\nexport var Rotate;\n(function (Rotate) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.start !== undefined) {\n Quaternion.encode(message.start, writer.uint32(10).fork()).ldelim();\n }\n if (message.end !== undefined) {\n Quaternion.encode(message.end, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n Rotate.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRotate();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.start = Quaternion.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.end = Quaternion.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Rotate.decode = decode;\n})(Rotate || (Rotate = {}));\nfunction createBaseScale() {\n return { start: undefined, end: undefined };\n}\n/**\n * @public\n */\nexport var Scale;\n(function (Scale) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.start !== undefined) {\n Vector3.encode(message.start, writer.uint32(10).fork()).ldelim();\n }\n if (message.end !== undefined) {\n Vector3.encode(message.end, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n Scale.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseScale();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.start = Vector3.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.end = Vector3.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Scale.decode = decode;\n})(Scale || (Scale = {}));\n", "import { PBTween } from './pb/decentraland/sdk/components/tween.gen';\n/**\n * @internal\n */\nexport const TweenSchema = {\n COMPONENT_ID: 1102,\n serialize(value, builder) {\n const writer = PBTween.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBTween.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBTween.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBTween\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { PBTween } from \"./tween.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var TweenLoop;\n(function (TweenLoop) {\n TweenLoop[TweenLoop[\"TL_RESTART\"] = 0] = \"TL_RESTART\";\n TweenLoop[TweenLoop[\"TL_YOYO\"] = 1] = \"TL_YOYO\";\n})(TweenLoop || (TweenLoop = {}));\nfunction createBasePBTweenSequence() {\n return { sequence: [], loop: undefined };\n}\n/**\n * @public\n */\nexport var PBTweenSequence;\n(function (PBTweenSequence) {\n function encode(message, writer = _m0.Writer.create()) {\n for (const v of message.sequence) {\n PBTween.encode(v, writer.uint32(10).fork()).ldelim();\n }\n if (message.loop !== undefined) {\n writer.uint32(16).int32(message.loop);\n }\n return writer;\n }\n PBTweenSequence.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBTweenSequence();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.sequence.push(PBTween.decode(reader, reader.uint32()));\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.loop = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBTweenSequence.decode = decode;\n})(PBTweenSequence || (PBTweenSequence = {}));\n", "import { PBTweenSequence } from './pb/decentraland/sdk/components/tween_sequence.gen';\n/**\n * @internal\n */\nexport const TweenSequenceSchema = {\n COMPONENT_ID: 1104,\n serialize(value, builder) {\n const writer = PBTweenSequence.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBTweenSequence.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBTweenSequence.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBTweenSequence\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var TweenStateStatus;\n(function (TweenStateStatus) {\n TweenStateStatus[TweenStateStatus[\"TS_ACTIVE\"] = 0] = \"TS_ACTIVE\";\n TweenStateStatus[TweenStateStatus[\"TS_COMPLETED\"] = 1] = \"TS_COMPLETED\";\n TweenStateStatus[TweenStateStatus[\"TS_PAUSED\"] = 2] = \"TS_PAUSED\";\n})(TweenStateStatus || (TweenStateStatus = {}));\nfunction createBasePBTweenState() {\n return { state: 0, currentTime: 0 };\n}\n/**\n * @public\n */\nexport var PBTweenState;\n(function (PBTweenState) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.state !== 0) {\n writer.uint32(8).int32(message.state);\n }\n if (message.currentTime !== 0) {\n writer.uint32(21).float(message.currentTime);\n }\n return writer;\n }\n PBTweenState.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBTweenState();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.state = reader.int32();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.currentTime = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBTweenState.decode = decode;\n})(PBTweenState || (PBTweenState = {}));\n", "import { PBTweenState } from './pb/decentraland/sdk/components/tween_state.gen';\n/**\n * @internal\n */\nexport const TweenStateSchema = {\n COMPONENT_ID: 1103,\n serialize(value, builder) {\n const writer = PBTweenState.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBTweenState.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBTweenState.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBTweenState\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { BorderRect } from \"../../common/border_rect.gen\";\nimport { Color4 } from \"../../common/colors.gen\";\nimport { TextureUnion } from \"../../common/texture.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var BackgroundTextureMode;\n(function (BackgroundTextureMode) {\n /**\n * NINE_SLICES - https://docs.unity3d.com/Manual/UIE-USS-SupportedProperties.html (Slicing section)\n * https://forum.unity.com/threads/how-does-slicing-in-ui-tookkit-works.1235863/\n * https://docs.unity3d.com/Manual/9SliceSprites.html\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-slice\n */\n BackgroundTextureMode[BackgroundTextureMode[\"NINE_SLICES\"] = 0] = \"NINE_SLICES\";\n /**\n * CENTER - CENTER enables the texture to be rendered centered in relation to the\n * element. If the element is smaller than the texture then the background\n * should use the element as stencil to cut off the out-of-bounds area\n */\n BackgroundTextureMode[BackgroundTextureMode[\"CENTER\"] = 1] = \"CENTER\";\n /**\n * STRETCH - STRETCH enables the texture to cover all the area of the container,\n * adopting its aspect ratio.\n */\n BackgroundTextureMode[BackgroundTextureMode[\"STRETCH\"] = 2] = \"STRETCH\";\n})(BackgroundTextureMode || (BackgroundTextureMode = {}));\nfunction createBasePBUiBackground() {\n return { color: undefined, texture: undefined, textureMode: 0, textureSlices: undefined, uvs: [] };\n}\n/**\n * @public\n */\nexport var PBUiBackground;\n(function (PBUiBackground) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.color !== undefined) {\n Color4.encode(message.color, writer.uint32(10).fork()).ldelim();\n }\n if (message.texture !== undefined) {\n TextureUnion.encode(message.texture, writer.uint32(18).fork()).ldelim();\n }\n if (message.textureMode !== 0) {\n writer.uint32(24).int32(message.textureMode);\n }\n if (message.textureSlices !== undefined) {\n BorderRect.encode(message.textureSlices, writer.uint32(34).fork()).ldelim();\n }\n writer.uint32(42).fork();\n for (const v of message.uvs) {\n writer.float(v);\n }\n writer.ldelim();\n return writer;\n }\n PBUiBackground.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiBackground();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.color = Color4.decode(reader, reader.uint32());\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.texture = TextureUnion.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.textureMode = reader.int32();\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.textureSlices = BorderRect.decode(reader, reader.uint32());\n continue;\n case 5:\n if (tag === 45) {\n message.uvs.push(reader.float());\n continue;\n }\n if (tag === 42) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.uvs.push(reader.float());\n }\n continue;\n }\n break;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiBackground.decode = decode;\n})(PBUiBackground || (PBUiBackground = {}));\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.common\";\nfunction createBaseBorderRect() {\n return { top: 0, left: 0, right: 0, bottom: 0 };\n}\n/**\n * @public\n */\nexport var BorderRect;\n(function (BorderRect) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.top !== 0) {\n writer.uint32(13).float(message.top);\n }\n if (message.left !== 0) {\n writer.uint32(21).float(message.left);\n }\n if (message.right !== 0) {\n writer.uint32(29).float(message.right);\n }\n if (message.bottom !== 0) {\n writer.uint32(37).float(message.bottom);\n }\n return writer;\n }\n BorderRect.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBorderRect();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.top = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.left = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.right = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.bottom = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n BorderRect.decode = decode;\n})(BorderRect || (BorderRect = {}));\nfunction createBaseRect() {\n return { x: 0, y: 0, width: 0, height: 0 };\n}\n/**\n * @public\n */\nexport var Rect;\n(function (Rect) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.x !== 0) {\n writer.uint32(13).float(message.x);\n }\n if (message.y !== 0) {\n writer.uint32(21).float(message.y);\n }\n if (message.width !== 0) {\n writer.uint32(29).float(message.width);\n }\n if (message.height !== 0) {\n writer.uint32(37).float(message.height);\n }\n return writer;\n }\n Rect.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseRect();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.x = reader.float();\n continue;\n case 2:\n if (tag !== 21) {\n break;\n }\n message.y = reader.float();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.width = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.height = reader.float();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Rect.decode = decode;\n})(Rect || (Rect = {}));\n", "import { PBUiBackground } from './pb/decentraland/sdk/components/ui_background.gen';\n/**\n * @internal\n */\nexport const UiBackgroundSchema = {\n COMPONENT_ID: 1053,\n serialize(value, builder) {\n const writer = PBUiBackground.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiBackground.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiBackground.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiBackground\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { BorderRect } from \"../../common/border_rect.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiCanvasInformation() {\n return { devicePixelRatio: 0, width: 0, height: 0, interactableArea: undefined };\n}\n/**\n * @public\n */\nexport var PBUiCanvasInformation;\n(function (PBUiCanvasInformation) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.devicePixelRatio !== 0) {\n writer.uint32(13).float(message.devicePixelRatio);\n }\n if (message.width !== 0) {\n writer.uint32(16).int32(message.width);\n }\n if (message.height !== 0) {\n writer.uint32(24).int32(message.height);\n }\n if (message.interactableArea !== undefined) {\n BorderRect.encode(message.interactableArea, writer.uint32(34).fork()).ldelim();\n }\n return writer;\n }\n PBUiCanvasInformation.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiCanvasInformation();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 13) {\n break;\n }\n message.devicePixelRatio = reader.float();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.width = reader.int32();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.height = reader.int32();\n continue;\n case 4:\n if (tag !== 34) {\n break;\n }\n message.interactableArea = BorderRect.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiCanvasInformation.decode = decode;\n})(PBUiCanvasInformation || (PBUiCanvasInformation = {}));\n", "import { PBUiCanvasInformation } from './pb/decentraland/sdk/components/ui_canvas_information.gen';\n/**\n * @internal\n */\nexport const UiCanvasInformationSchema = {\n COMPONENT_ID: 1054,\n serialize(value, builder) {\n const writer = PBUiCanvasInformation.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiCanvasInformation.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiCanvasInformation.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiCanvasInformation\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color4 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiDropdown() {\n return {\n acceptEmpty: false,\n emptyLabel: undefined,\n options: [],\n selectedIndex: undefined,\n disabled: false,\n color: undefined,\n textAlign: undefined,\n font: undefined,\n fontSize: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBUiDropdown;\n(function (PBUiDropdown) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.acceptEmpty === true) {\n writer.uint32(8).bool(message.acceptEmpty);\n }\n if (message.emptyLabel !== undefined) {\n writer.uint32(18).string(message.emptyLabel);\n }\n for (const v of message.options) {\n writer.uint32(26).string(v);\n }\n if (message.selectedIndex !== undefined) {\n writer.uint32(32).int32(message.selectedIndex);\n }\n if (message.disabled === true) {\n writer.uint32(40).bool(message.disabled);\n }\n if (message.color !== undefined) {\n Color4.encode(message.color, writer.uint32(50).fork()).ldelim();\n }\n if (message.textAlign !== undefined) {\n writer.uint32(80).int32(message.textAlign);\n }\n if (message.font !== undefined) {\n writer.uint32(88).int32(message.font);\n }\n if (message.fontSize !== undefined) {\n writer.uint32(96).int32(message.fontSize);\n }\n return writer;\n }\n PBUiDropdown.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiDropdown();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.acceptEmpty = reader.bool();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.emptyLabel = reader.string();\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.options.push(reader.string());\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.selectedIndex = reader.int32();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.disabled = reader.bool();\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.color = Color4.decode(reader, reader.uint32());\n continue;\n case 10:\n if (tag !== 80) {\n break;\n }\n message.textAlign = reader.int32();\n continue;\n case 11:\n if (tag !== 88) {\n break;\n }\n message.font = reader.int32();\n continue;\n case 12:\n if (tag !== 96) {\n break;\n }\n message.fontSize = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiDropdown.decode = decode;\n})(PBUiDropdown || (PBUiDropdown = {}));\n", "import { PBUiDropdown } from './pb/decentraland/sdk/components/ui_dropdown.gen';\n/**\n * @internal\n */\nexport const UiDropdownSchema = {\n COMPONENT_ID: 1094,\n serialize(value, builder) {\n const writer = PBUiDropdown.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiDropdown.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiDropdown.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiDropdown\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiDropdownResult() {\n return { value: 0 };\n}\n/**\n * @public\n */\nexport var PBUiDropdownResult;\n(function (PBUiDropdownResult) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.value !== 0) {\n writer.uint32(8).int32(message.value);\n }\n return writer;\n }\n PBUiDropdownResult.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiDropdownResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.value = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiDropdownResult.decode = decode;\n})(PBUiDropdownResult || (PBUiDropdownResult = {}));\n", "import { PBUiDropdownResult } from './pb/decentraland/sdk/components/ui_dropdown_result.gen';\n/**\n * @internal\n */\nexport const UiDropdownResultSchema = {\n COMPONENT_ID: 1096,\n serialize(value, builder) {\n const writer = PBUiDropdownResult.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiDropdownResult.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiDropdownResult.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiDropdownResult\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color4 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiInput() {\n return {\n placeholder: \"\",\n color: undefined,\n placeholderColor: undefined,\n disabled: false,\n textAlign: undefined,\n font: undefined,\n fontSize: undefined,\n value: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBUiInput;\n(function (PBUiInput) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.placeholder !== \"\") {\n writer.uint32(10).string(message.placeholder);\n }\n if (message.color !== undefined) {\n Color4.encode(message.color, writer.uint32(18).fork()).ldelim();\n }\n if (message.placeholderColor !== undefined) {\n Color4.encode(message.placeholderColor, writer.uint32(26).fork()).ldelim();\n }\n if (message.disabled === true) {\n writer.uint32(32).bool(message.disabled);\n }\n if (message.textAlign !== undefined) {\n writer.uint32(80).int32(message.textAlign);\n }\n if (message.font !== undefined) {\n writer.uint32(88).int32(message.font);\n }\n if (message.fontSize !== undefined) {\n writer.uint32(96).int32(message.fontSize);\n }\n if (message.value !== undefined) {\n writer.uint32(106).string(message.value);\n }\n return writer;\n }\n PBUiInput.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiInput();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.placeholder = reader.string();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.color = Color4.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.placeholderColor = Color4.decode(reader, reader.uint32());\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.disabled = reader.bool();\n continue;\n case 10:\n if (tag !== 80) {\n break;\n }\n message.textAlign = reader.int32();\n continue;\n case 11:\n if (tag !== 88) {\n break;\n }\n message.font = reader.int32();\n continue;\n case 12:\n if (tag !== 96) {\n break;\n }\n message.fontSize = reader.int32();\n continue;\n case 13:\n if (tag !== 106) {\n break;\n }\n message.value = reader.string();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiInput.decode = decode;\n})(PBUiInput || (PBUiInput = {}));\n", "import { PBUiInput } from './pb/decentraland/sdk/components/ui_input.gen';\n/**\n * @internal\n */\nexport const UiInputSchema = {\n COMPONENT_ID: 1093,\n serialize(value, builder) {\n const writer = PBUiInput.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiInput.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiInput.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiInput\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiInputResult() {\n return { value: \"\", isSubmit: undefined };\n}\n/**\n * @public\n */\nexport var PBUiInputResult;\n(function (PBUiInputResult) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.value !== \"\") {\n writer.uint32(10).string(message.value);\n }\n if (message.isSubmit !== undefined) {\n writer.uint32(16).bool(message.isSubmit);\n }\n return writer;\n }\n PBUiInputResult.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiInputResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.value = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.isSubmit = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiInputResult.decode = decode;\n})(PBUiInputResult || (PBUiInputResult = {}));\n", "import { PBUiInputResult } from './pb/decentraland/sdk/components/ui_input_result.gen';\n/**\n * @internal\n */\nexport const UiInputResultSchema = {\n COMPONENT_ID: 1095,\n serialize(value, builder) {\n const writer = PBUiInputResult.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiInputResult.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiInputResult.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiInputResult\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Color4 } from \"../../common/colors.gen\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBUiText() {\n return { value: \"\", color: undefined, textAlign: undefined, font: undefined, fontSize: undefined };\n}\n/**\n * @public\n */\nexport var PBUiText;\n(function (PBUiText) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.value !== \"\") {\n writer.uint32(10).string(message.value);\n }\n if (message.color !== undefined) {\n Color4.encode(message.color, writer.uint32(18).fork()).ldelim();\n }\n if (message.textAlign !== undefined) {\n writer.uint32(24).int32(message.textAlign);\n }\n if (message.font !== undefined) {\n writer.uint32(32).int32(message.font);\n }\n if (message.fontSize !== undefined) {\n writer.uint32(40).int32(message.fontSize);\n }\n return writer;\n }\n PBUiText.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiText();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.value = reader.string();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.color = Color4.decode(reader, reader.uint32());\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.textAlign = reader.int32();\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.font = reader.int32();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.fontSize = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiText.decode = decode;\n})(PBUiText || (PBUiText = {}));\n", "import { PBUiText } from './pb/decentraland/sdk/components/ui_text.gen';\n/**\n * @internal\n */\nexport const UiTextSchema = {\n COMPONENT_ID: 1052,\n serialize(value, builder) {\n const writer = PBUiText.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiText.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiText.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiText\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var YGPositionType;\n(function (YGPositionType) {\n YGPositionType[YGPositionType[\"YGPT_RELATIVE\"] = 0] = \"YGPT_RELATIVE\";\n YGPositionType[YGPositionType[\"YGPT_ABSOLUTE\"] = 1] = \"YGPT_ABSOLUTE\";\n})(YGPositionType || (YGPositionType = {}));\n/**\n * @public\n */\nexport var YGAlign;\n(function (YGAlign) {\n YGAlign[YGAlign[\"YGA_AUTO\"] = 0] = \"YGA_AUTO\";\n YGAlign[YGAlign[\"YGA_FLEX_START\"] = 1] = \"YGA_FLEX_START\";\n YGAlign[YGAlign[\"YGA_CENTER\"] = 2] = \"YGA_CENTER\";\n YGAlign[YGAlign[\"YGA_FLEX_END\"] = 3] = \"YGA_FLEX_END\";\n YGAlign[YGAlign[\"YGA_STRETCH\"] = 4] = \"YGA_STRETCH\";\n YGAlign[YGAlign[\"YGA_BASELINE\"] = 5] = \"YGA_BASELINE\";\n YGAlign[YGAlign[\"YGA_SPACE_BETWEEN\"] = 6] = \"YGA_SPACE_BETWEEN\";\n YGAlign[YGAlign[\"YGA_SPACE_AROUND\"] = 7] = \"YGA_SPACE_AROUND\";\n})(YGAlign || (YGAlign = {}));\n/**\n * @public\n */\nexport var YGUnit;\n(function (YGUnit) {\n YGUnit[YGUnit[\"YGU_UNDEFINED\"] = 0] = \"YGU_UNDEFINED\";\n YGUnit[YGUnit[\"YGU_POINT\"] = 1] = \"YGU_POINT\";\n YGUnit[YGUnit[\"YGU_PERCENT\"] = 2] = \"YGU_PERCENT\";\n YGUnit[YGUnit[\"YGU_AUTO\"] = 3] = \"YGU_AUTO\";\n})(YGUnit || (YGUnit = {}));\n/**\n * @public\n */\nexport var YGFlexDirection;\n(function (YGFlexDirection) {\n YGFlexDirection[YGFlexDirection[\"YGFD_ROW\"] = 0] = \"YGFD_ROW\";\n YGFlexDirection[YGFlexDirection[\"YGFD_COLUMN\"] = 1] = \"YGFD_COLUMN\";\n YGFlexDirection[YGFlexDirection[\"YGFD_COLUMN_REVERSE\"] = 2] = \"YGFD_COLUMN_REVERSE\";\n YGFlexDirection[YGFlexDirection[\"YGFD_ROW_REVERSE\"] = 3] = \"YGFD_ROW_REVERSE\";\n})(YGFlexDirection || (YGFlexDirection = {}));\n/**\n * @public\n */\nexport var YGWrap;\n(function (YGWrap) {\n YGWrap[YGWrap[\"YGW_NO_WRAP\"] = 0] = \"YGW_NO_WRAP\";\n YGWrap[YGWrap[\"YGW_WRAP\"] = 1] = \"YGW_WRAP\";\n YGWrap[YGWrap[\"YGW_WRAP_REVERSE\"] = 2] = \"YGW_WRAP_REVERSE\";\n})(YGWrap || (YGWrap = {}));\n/**\n * @public\n */\nexport var YGJustify;\n(function (YGJustify) {\n YGJustify[YGJustify[\"YGJ_FLEX_START\"] = 0] = \"YGJ_FLEX_START\";\n YGJustify[YGJustify[\"YGJ_CENTER\"] = 1] = \"YGJ_CENTER\";\n YGJustify[YGJustify[\"YGJ_FLEX_END\"] = 2] = \"YGJ_FLEX_END\";\n YGJustify[YGJustify[\"YGJ_SPACE_BETWEEN\"] = 3] = \"YGJ_SPACE_BETWEEN\";\n YGJustify[YGJustify[\"YGJ_SPACE_AROUND\"] = 4] = \"YGJ_SPACE_AROUND\";\n YGJustify[YGJustify[\"YGJ_SPACE_EVENLY\"] = 5] = \"YGJ_SPACE_EVENLY\";\n})(YGJustify || (YGJustify = {}));\n/**\n * @public\n */\nexport var YGOverflow;\n(function (YGOverflow) {\n YGOverflow[YGOverflow[\"YGO_VISIBLE\"] = 0] = \"YGO_VISIBLE\";\n YGOverflow[YGOverflow[\"YGO_HIDDEN\"] = 1] = \"YGO_HIDDEN\";\n YGOverflow[YGOverflow[\"YGO_SCROLL\"] = 2] = \"YGO_SCROLL\";\n})(YGOverflow || (YGOverflow = {}));\n/**\n * @public\n */\nexport var YGDisplay;\n(function (YGDisplay) {\n YGDisplay[YGDisplay[\"YGD_FLEX\"] = 0] = \"YGD_FLEX\";\n YGDisplay[YGDisplay[\"YGD_NONE\"] = 1] = \"YGD_NONE\";\n})(YGDisplay || (YGDisplay = {}));\n/**\n * @public\n */\nexport var YGEdge;\n(function (YGEdge) {\n YGEdge[YGEdge[\"YGE_LEFT\"] = 0] = \"YGE_LEFT\";\n YGEdge[YGEdge[\"YGE_TOP\"] = 1] = \"YGE_TOP\";\n YGEdge[YGEdge[\"YGE_RIGHT\"] = 2] = \"YGE_RIGHT\";\n YGEdge[YGEdge[\"YGE_BOTTOM\"] = 3] = \"YGE_BOTTOM\";\n YGEdge[YGEdge[\"YGE_START\"] = 4] = \"YGE_START\";\n YGEdge[YGEdge[\"YGE_END\"] = 5] = \"YGE_END\";\n YGEdge[YGEdge[\"YGE_HORIZONTAL\"] = 6] = \"YGE_HORIZONTAL\";\n YGEdge[YGEdge[\"YGE_VERTICAL\"] = 7] = \"YGE_VERTICAL\";\n YGEdge[YGEdge[\"YGE_ALL\"] = 8] = \"YGE_ALL\";\n})(YGEdge || (YGEdge = {}));\n/**\n * @public\n */\nexport var PointerFilterMode;\n(function (PointerFilterMode) {\n PointerFilterMode[PointerFilterMode[\"PFM_NONE\"] = 0] = \"PFM_NONE\";\n PointerFilterMode[PointerFilterMode[\"PFM_BLOCK\"] = 1] = \"PFM_BLOCK\";\n})(PointerFilterMode || (PointerFilterMode = {}));\nfunction createBasePBUiTransform() {\n return {\n parent: 0,\n rightOf: 0,\n alignContent: undefined,\n alignItems: undefined,\n flexWrap: undefined,\n flexShrink: undefined,\n positionType: 0,\n alignSelf: 0,\n flexDirection: 0,\n justifyContent: 0,\n overflow: 0,\n display: 0,\n flexBasisUnit: 0,\n flexBasis: 0,\n flexGrow: 0,\n widthUnit: 0,\n width: 0,\n heightUnit: 0,\n height: 0,\n minWidthUnit: 0,\n minWidth: 0,\n minHeightUnit: 0,\n minHeight: 0,\n maxWidthUnit: 0,\n maxWidth: 0,\n maxHeightUnit: 0,\n maxHeight: 0,\n positionLeftUnit: 0,\n positionLeft: 0,\n positionTopUnit: 0,\n positionTop: 0,\n positionRightUnit: 0,\n positionRight: 0,\n positionBottomUnit: 0,\n positionBottom: 0,\n marginLeftUnit: 0,\n marginLeft: 0,\n marginTopUnit: 0,\n marginTop: 0,\n marginRightUnit: 0,\n marginRight: 0,\n marginBottomUnit: 0,\n marginBottom: 0,\n paddingLeftUnit: 0,\n paddingLeft: 0,\n paddingTopUnit: 0,\n paddingTop: 0,\n paddingRightUnit: 0,\n paddingRight: 0,\n paddingBottomUnit: 0,\n paddingBottom: 0,\n pointerFilter: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBUiTransform;\n(function (PBUiTransform) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.parent !== 0) {\n writer.uint32(8).int32(message.parent);\n }\n if (message.rightOf !== 0) {\n writer.uint32(16).int32(message.rightOf);\n }\n if (message.alignContent !== undefined) {\n writer.uint32(24).int32(message.alignContent);\n }\n if (message.alignItems !== undefined) {\n writer.uint32(32).int32(message.alignItems);\n }\n if (message.flexWrap !== undefined) {\n writer.uint32(40).int32(message.flexWrap);\n }\n if (message.flexShrink !== undefined) {\n writer.uint32(53).float(message.flexShrink);\n }\n if (message.positionType !== 0) {\n writer.uint32(56).int32(message.positionType);\n }\n if (message.alignSelf !== 0) {\n writer.uint32(64).int32(message.alignSelf);\n }\n if (message.flexDirection !== 0) {\n writer.uint32(72).int32(message.flexDirection);\n }\n if (message.justifyContent !== 0) {\n writer.uint32(80).int32(message.justifyContent);\n }\n if (message.overflow !== 0) {\n writer.uint32(88).int32(message.overflow);\n }\n if (message.display !== 0) {\n writer.uint32(96).int32(message.display);\n }\n if (message.flexBasisUnit !== 0) {\n writer.uint32(104).int32(message.flexBasisUnit);\n }\n if (message.flexBasis !== 0) {\n writer.uint32(117).float(message.flexBasis);\n }\n if (message.flexGrow !== 0) {\n writer.uint32(125).float(message.flexGrow);\n }\n if (message.widthUnit !== 0) {\n writer.uint32(128).int32(message.widthUnit);\n }\n if (message.width !== 0) {\n writer.uint32(141).float(message.width);\n }\n if (message.heightUnit !== 0) {\n writer.uint32(144).int32(message.heightUnit);\n }\n if (message.height !== 0) {\n writer.uint32(157).float(message.height);\n }\n if (message.minWidthUnit !== 0) {\n writer.uint32(160).int32(message.minWidthUnit);\n }\n if (message.minWidth !== 0) {\n writer.uint32(173).float(message.minWidth);\n }\n if (message.minHeightUnit !== 0) {\n writer.uint32(176).int32(message.minHeightUnit);\n }\n if (message.minHeight !== 0) {\n writer.uint32(189).float(message.minHeight);\n }\n if (message.maxWidthUnit !== 0) {\n writer.uint32(192).int32(message.maxWidthUnit);\n }\n if (message.maxWidth !== 0) {\n writer.uint32(205).float(message.maxWidth);\n }\n if (message.maxHeightUnit !== 0) {\n writer.uint32(208).int32(message.maxHeightUnit);\n }\n if (message.maxHeight !== 0) {\n writer.uint32(221).float(message.maxHeight);\n }\n if (message.positionLeftUnit !== 0) {\n writer.uint32(224).int32(message.positionLeftUnit);\n }\n if (message.positionLeft !== 0) {\n writer.uint32(237).float(message.positionLeft);\n }\n if (message.positionTopUnit !== 0) {\n writer.uint32(240).int32(message.positionTopUnit);\n }\n if (message.positionTop !== 0) {\n writer.uint32(253).float(message.positionTop);\n }\n if (message.positionRightUnit !== 0) {\n writer.uint32(256).int32(message.positionRightUnit);\n }\n if (message.positionRight !== 0) {\n writer.uint32(269).float(message.positionRight);\n }\n if (message.positionBottomUnit !== 0) {\n writer.uint32(272).int32(message.positionBottomUnit);\n }\n if (message.positionBottom !== 0) {\n writer.uint32(285).float(message.positionBottom);\n }\n if (message.marginLeftUnit !== 0) {\n writer.uint32(288).int32(message.marginLeftUnit);\n }\n if (message.marginLeft !== 0) {\n writer.uint32(301).float(message.marginLeft);\n }\n if (message.marginTopUnit !== 0) {\n writer.uint32(304).int32(message.marginTopUnit);\n }\n if (message.marginTop !== 0) {\n writer.uint32(317).float(message.marginTop);\n }\n if (message.marginRightUnit !== 0) {\n writer.uint32(320).int32(message.marginRightUnit);\n }\n if (message.marginRight !== 0) {\n writer.uint32(333).float(message.marginRight);\n }\n if (message.marginBottomUnit !== 0) {\n writer.uint32(336).int32(message.marginBottomUnit);\n }\n if (message.marginBottom !== 0) {\n writer.uint32(349).float(message.marginBottom);\n }\n if (message.paddingLeftUnit !== 0) {\n writer.uint32(352).int32(message.paddingLeftUnit);\n }\n if (message.paddingLeft !== 0) {\n writer.uint32(365).float(message.paddingLeft);\n }\n if (message.paddingTopUnit !== 0) {\n writer.uint32(368).int32(message.paddingTopUnit);\n }\n if (message.paddingTop !== 0) {\n writer.uint32(381).float(message.paddingTop);\n }\n if (message.paddingRightUnit !== 0) {\n writer.uint32(384).int32(message.paddingRightUnit);\n }\n if (message.paddingRight !== 0) {\n writer.uint32(397).float(message.paddingRight);\n }\n if (message.paddingBottomUnit !== 0) {\n writer.uint32(400).int32(message.paddingBottomUnit);\n }\n if (message.paddingBottom !== 0) {\n writer.uint32(413).float(message.paddingBottom);\n }\n if (message.pointerFilter !== undefined) {\n writer.uint32(416).int32(message.pointerFilter);\n }\n return writer;\n }\n PBUiTransform.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBUiTransform();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.parent = reader.int32();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.rightOf = reader.int32();\n continue;\n case 3:\n if (tag !== 24) {\n break;\n }\n message.alignContent = reader.int32();\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.alignItems = reader.int32();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.flexWrap = reader.int32();\n continue;\n case 6:\n if (tag !== 53) {\n break;\n }\n message.flexShrink = reader.float();\n continue;\n case 7:\n if (tag !== 56) {\n break;\n }\n message.positionType = reader.int32();\n continue;\n case 8:\n if (tag !== 64) {\n break;\n }\n message.alignSelf = reader.int32();\n continue;\n case 9:\n if (tag !== 72) {\n break;\n }\n message.flexDirection = reader.int32();\n continue;\n case 10:\n if (tag !== 80) {\n break;\n }\n message.justifyContent = reader.int32();\n continue;\n case 11:\n if (tag !== 88) {\n break;\n }\n message.overflow = reader.int32();\n continue;\n case 12:\n if (tag !== 96) {\n break;\n }\n message.display = reader.int32();\n continue;\n case 13:\n if (tag !== 104) {\n break;\n }\n message.flexBasisUnit = reader.int32();\n continue;\n case 14:\n if (tag !== 117) {\n break;\n }\n message.flexBasis = reader.float();\n continue;\n case 15:\n if (tag !== 125) {\n break;\n }\n message.flexGrow = reader.float();\n continue;\n case 16:\n if (tag !== 128) {\n break;\n }\n message.widthUnit = reader.int32();\n continue;\n case 17:\n if (tag !== 141) {\n break;\n }\n message.width = reader.float();\n continue;\n case 18:\n if (tag !== 144) {\n break;\n }\n message.heightUnit = reader.int32();\n continue;\n case 19:\n if (tag !== 157) {\n break;\n }\n message.height = reader.float();\n continue;\n case 20:\n if (tag !== 160) {\n break;\n }\n message.minWidthUnit = reader.int32();\n continue;\n case 21:\n if (tag !== 173) {\n break;\n }\n message.minWidth = reader.float();\n continue;\n case 22:\n if (tag !== 176) {\n break;\n }\n message.minHeightUnit = reader.int32();\n continue;\n case 23:\n if (tag !== 189) {\n break;\n }\n message.minHeight = reader.float();\n continue;\n case 24:\n if (tag !== 192) {\n break;\n }\n message.maxWidthUnit = reader.int32();\n continue;\n case 25:\n if (tag !== 205) {\n break;\n }\n message.maxWidth = reader.float();\n continue;\n case 26:\n if (tag !== 208) {\n break;\n }\n message.maxHeightUnit = reader.int32();\n continue;\n case 27:\n if (tag !== 221) {\n break;\n }\n message.maxHeight = reader.float();\n continue;\n case 28:\n if (tag !== 224) {\n break;\n }\n message.positionLeftUnit = reader.int32();\n continue;\n case 29:\n if (tag !== 237) {\n break;\n }\n message.positionLeft = reader.float();\n continue;\n case 30:\n if (tag !== 240) {\n break;\n }\n message.positionTopUnit = reader.int32();\n continue;\n case 31:\n if (tag !== 253) {\n break;\n }\n message.positionTop = reader.float();\n continue;\n case 32:\n if (tag !== 256) {\n break;\n }\n message.positionRightUnit = reader.int32();\n continue;\n case 33:\n if (tag !== 269) {\n break;\n }\n message.positionRight = reader.float();\n continue;\n case 34:\n if (tag !== 272) {\n break;\n }\n message.positionBottomUnit = reader.int32();\n continue;\n case 35:\n if (tag !== 285) {\n break;\n }\n message.positionBottom = reader.float();\n continue;\n case 36:\n if (tag !== 288) {\n break;\n }\n message.marginLeftUnit = reader.int32();\n continue;\n case 37:\n if (tag !== 301) {\n break;\n }\n message.marginLeft = reader.float();\n continue;\n case 38:\n if (tag !== 304) {\n break;\n }\n message.marginTopUnit = reader.int32();\n continue;\n case 39:\n if (tag !== 317) {\n break;\n }\n message.marginTop = reader.float();\n continue;\n case 40:\n if (tag !== 320) {\n break;\n }\n message.marginRightUnit = reader.int32();\n continue;\n case 41:\n if (tag !== 333) {\n break;\n }\n message.marginRight = reader.float();\n continue;\n case 42:\n if (tag !== 336) {\n break;\n }\n message.marginBottomUnit = reader.int32();\n continue;\n case 43:\n if (tag !== 349) {\n break;\n }\n message.marginBottom = reader.float();\n continue;\n case 44:\n if (tag !== 352) {\n break;\n }\n message.paddingLeftUnit = reader.int32();\n continue;\n case 45:\n if (tag !== 365) {\n break;\n }\n message.paddingLeft = reader.float();\n continue;\n case 46:\n if (tag !== 368) {\n break;\n }\n message.paddingTopUnit = reader.int32();\n continue;\n case 47:\n if (tag !== 381) {\n break;\n }\n message.paddingTop = reader.float();\n continue;\n case 48:\n if (tag !== 384) {\n break;\n }\n message.paddingRightUnit = reader.int32();\n continue;\n case 49:\n if (tag !== 397) {\n break;\n }\n message.paddingRight = reader.float();\n continue;\n case 50:\n if (tag !== 400) {\n break;\n }\n message.paddingBottomUnit = reader.int32();\n continue;\n case 51:\n if (tag !== 413) {\n break;\n }\n message.paddingBottom = reader.float();\n continue;\n case 52:\n if (tag !== 416) {\n break;\n }\n message.pointerFilter = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBUiTransform.decode = decode;\n})(PBUiTransform || (PBUiTransform = {}));\n", "import { PBUiTransform } from './pb/decentraland/sdk/components/ui_transform.gen';\n/**\n * @internal\n */\nexport const UiTransformSchema = {\n COMPONENT_ID: 1050,\n serialize(value, builder) {\n const writer = PBUiTransform.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBUiTransform.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBUiTransform.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBUiTransform\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\n/**\n * @public\n */\nexport var VideoState;\n(function (VideoState) {\n VideoState[VideoState[\"VS_NONE\"] = 0] = \"VS_NONE\";\n VideoState[VideoState[\"VS_ERROR\"] = 1] = \"VS_ERROR\";\n VideoState[VideoState[\"VS_LOADING\"] = 2] = \"VS_LOADING\";\n VideoState[VideoState[\"VS_READY\"] = 3] = \"VS_READY\";\n VideoState[VideoState[\"VS_PLAYING\"] = 4] = \"VS_PLAYING\";\n VideoState[VideoState[\"VS_BUFFERING\"] = 5] = \"VS_BUFFERING\";\n VideoState[VideoState[\"VS_SEEKING\"] = 6] = \"VS_SEEKING\";\n VideoState[VideoState[\"VS_PAUSED\"] = 7] = \"VS_PAUSED\";\n})(VideoState || (VideoState = {}));\nfunction createBasePBVideoEvent() {\n return { timestamp: 0, tickNumber: 0, currentOffset: 0, videoLength: 0, state: 0 };\n}\n/**\n * @public\n */\nexport var PBVideoEvent;\n(function (PBVideoEvent) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.timestamp !== 0) {\n writer.uint32(8).uint32(message.timestamp);\n }\n if (message.tickNumber !== 0) {\n writer.uint32(16).uint32(message.tickNumber);\n }\n if (message.currentOffset !== 0) {\n writer.uint32(29).float(message.currentOffset);\n }\n if (message.videoLength !== 0) {\n writer.uint32(37).float(message.videoLength);\n }\n if (message.state !== 0) {\n writer.uint32(40).int32(message.state);\n }\n return writer;\n }\n PBVideoEvent.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBVideoEvent();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.timestamp = reader.uint32();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.tickNumber = reader.uint32();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.currentOffset = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.videoLength = reader.float();\n continue;\n case 5:\n if (tag !== 40) {\n break;\n }\n message.state = reader.int32();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBVideoEvent.decode = decode;\n})(PBVideoEvent || (PBVideoEvent = {}));\n", "import { PBVideoEvent } from './pb/decentraland/sdk/components/video_event.gen';\n/**\n * @internal\n */\nexport const VideoEventSchema = {\n COMPONENT_ID: 1044,\n serialize(value, builder) {\n const writer = PBVideoEvent.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBVideoEvent.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBVideoEvent.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBVideoEvent\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBVideoPlayer() {\n return {\n src: \"\",\n playing: undefined,\n position: undefined,\n volume: undefined,\n playbackRate: undefined,\n loop: undefined,\n };\n}\n/**\n * @public\n */\nexport var PBVideoPlayer;\n(function (PBVideoPlayer) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.src !== \"\") {\n writer.uint32(10).string(message.src);\n }\n if (message.playing !== undefined) {\n writer.uint32(16).bool(message.playing);\n }\n if (message.position !== undefined) {\n writer.uint32(29).float(message.position);\n }\n if (message.volume !== undefined) {\n writer.uint32(37).float(message.volume);\n }\n if (message.playbackRate !== undefined) {\n writer.uint32(45).float(message.playbackRate);\n }\n if (message.loop !== undefined) {\n writer.uint32(48).bool(message.loop);\n }\n return writer;\n }\n PBVideoPlayer.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBVideoPlayer();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.src = reader.string();\n continue;\n case 2:\n if (tag !== 16) {\n break;\n }\n message.playing = reader.bool();\n continue;\n case 3:\n if (tag !== 29) {\n break;\n }\n message.position = reader.float();\n continue;\n case 4:\n if (tag !== 37) {\n break;\n }\n message.volume = reader.float();\n continue;\n case 5:\n if (tag !== 45) {\n break;\n }\n message.playbackRate = reader.float();\n continue;\n case 6:\n if (tag !== 48) {\n break;\n }\n message.loop = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBVideoPlayer.decode = decode;\n})(PBVideoPlayer || (PBVideoPlayer = {}));\n", "import { PBVideoPlayer } from './pb/decentraland/sdk/components/video_player.gen';\n/**\n * @internal\n */\nexport const VideoPlayerSchema = {\n COMPONENT_ID: 1043,\n serialize(value, builder) {\n const writer = PBVideoPlayer.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBVideoPlayer.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBVideoPlayer.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBVideoPlayer\"\n }\n};\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"decentraland.sdk.components\";\nfunction createBasePBVisibilityComponent() {\n return { visible: undefined };\n}\n/**\n * @public\n */\nexport var PBVisibilityComponent;\n(function (PBVisibilityComponent) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.visible !== undefined) {\n writer.uint32(8).bool(message.visible);\n }\n return writer;\n }\n PBVisibilityComponent.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePBVisibilityComponent();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.visible = reader.bool();\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n PBVisibilityComponent.decode = decode;\n})(PBVisibilityComponent || (PBVisibilityComponent = {}));\n", "import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibility_component.gen';\n/**\n * @internal\n */\nexport const VisibilityComponentSchema = {\n COMPONENT_ID: 1081,\n serialize(value, builder) {\n const writer = PBVisibilityComponent.encode(value);\n const buffer = new Uint8Array(writer.finish(), 0, writer.len);\n builder.writeBuffer(buffer, false);\n },\n deserialize(reader) {\n return PBVisibilityComponent.decode(reader.buffer(), reader.remainingBytes());\n },\n create() {\n // TODO: this is a hack.\n return PBVisibilityComponent.decode(new Uint8Array());\n },\n jsonSchema: {\n type: \"object\",\n properties: {},\n serializationType: \"protocol-buffer\",\n protocolBuffer: \"PBVisibilityComponent\"\n }\n};\n", "import { AnimatorSchema } from './Animator.gen';\nimport { AudioSourceSchema } from './AudioSource.gen';\nimport { AudioStreamSchema } from './AudioStream.gen';\nimport { AvatarAttachSchema } from './AvatarAttach.gen';\nimport { AvatarModifierAreaSchema } from './AvatarModifierArea.gen';\nimport { AvatarShapeSchema } from './AvatarShape.gen';\nimport { BillboardSchema } from './Billboard.gen';\nimport { CameraModeSchema } from './CameraMode.gen';\nimport { CameraModeAreaSchema } from './CameraModeArea.gen';\nimport { EngineInfoSchema } from './EngineInfo.gen';\nimport { GltfContainerSchema } from './GltfContainer.gen';\nimport { GltfContainerLoadingStateSchema } from './GltfContainerLoadingState.gen';\nimport { MaterialSchema } from './Material.gen';\nimport { MeshColliderSchema } from './MeshCollider.gen';\nimport { MeshRendererSchema } from './MeshRenderer.gen';\nimport { NftShapeSchema } from './NftShape.gen';\nimport { PointerEventsSchema } from './PointerEvents.gen';\nimport { PointerEventsResultSchema } from './PointerEventsResult.gen';\nimport { PointerLockSchema } from './PointerLock.gen';\nimport { RaycastSchema } from './Raycast.gen';\nimport { RaycastResultSchema } from './RaycastResult.gen';\nimport { TextShapeSchema } from './TextShape.gen';\nimport { TweenSchema } from './Tween.gen';\nimport { TweenSequenceSchema } from './TweenSequence.gen';\nimport { TweenStateSchema } from './TweenState.gen';\nimport { UiBackgroundSchema } from './UiBackground.gen';\nimport { UiCanvasInformationSchema } from './UiCanvasInformation.gen';\nimport { UiDropdownSchema } from './UiDropdown.gen';\nimport { UiDropdownResultSchema } from './UiDropdownResult.gen';\nimport { UiInputSchema } from './UiInput.gen';\nimport { UiInputResultSchema } from './UiInputResult.gen';\nimport { UiTextSchema } from './UiText.gen';\nimport { UiTransformSchema } from './UiTransform.gen';\nimport { VideoEventSchema } from './VideoEvent.gen';\nimport { VideoPlayerSchema } from './VideoPlayer.gen';\nimport { VisibilityComponentSchema } from './VisibilityComponent.gen';\nexport * from './pb/decentraland/sdk/components/animator.gen';\nexport * from './pb/decentraland/sdk/components/audio_source.gen';\nexport * from './pb/decentraland/sdk/components/audio_stream.gen';\nexport * from './pb/decentraland/sdk/components/avatar_attach.gen';\nexport * from './pb/decentraland/sdk/components/avatar_modifier_area.gen';\nexport * from './pb/decentraland/sdk/components/avatar_shape.gen';\nexport * from './pb/decentraland/sdk/components/billboard.gen';\nexport * from './pb/decentraland/sdk/components/camera_mode.gen';\nexport * from './pb/decentraland/sdk/components/camera_mode_area.gen';\nexport * from './pb/decentraland/sdk/components/engine_info.gen';\nexport * from './pb/decentraland/sdk/components/gltf_container.gen';\nexport * from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';\nexport * from './pb/decentraland/sdk/components/material.gen';\nexport * from './pb/decentraland/sdk/components/mesh_collider.gen';\nexport * from './pb/decentraland/sdk/components/mesh_renderer.gen';\nexport * from './pb/decentraland/sdk/components/nft_shape.gen';\nexport * from './pb/decentraland/sdk/components/pointer_events.gen';\nexport * from './pb/decentraland/sdk/components/pointer_events_result.gen';\nexport * from './pb/decentraland/sdk/components/pointer_lock.gen';\nexport * from './pb/decentraland/sdk/components/raycast.gen';\nexport * from './pb/decentraland/sdk/components/raycast_result.gen';\nexport * from './pb/decentraland/sdk/components/text_shape.gen';\nexport * from './pb/decentraland/sdk/components/tween.gen';\nexport * from './pb/decentraland/sdk/components/tween_sequence.gen';\nexport * from './pb/decentraland/sdk/components/tween_state.gen';\nexport * from './pb/decentraland/sdk/components/ui_background.gen';\nexport * from './pb/decentraland/sdk/components/ui_canvas_information.gen';\nexport * from './pb/decentraland/sdk/components/ui_dropdown.gen';\nexport * from './pb/decentraland/sdk/components/ui_dropdown_result.gen';\nexport * from './pb/decentraland/sdk/components/ui_input.gen';\nexport * from './pb/decentraland/sdk/components/ui_input_result.gen';\nexport * from './pb/decentraland/sdk/components/ui_text.gen';\nexport * from './pb/decentraland/sdk/components/ui_transform.gen';\nexport * from './pb/decentraland/sdk/components/video_event.gen';\nexport * from './pb/decentraland/sdk/components/video_player.gen';\nexport * from './pb/decentraland/sdk/components/visibility_component.gen';\n/** @public */ export const Animator = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::Animator\", AnimatorSchema);\n/** @public */ export const AudioSource = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::AudioSource\", AudioSourceSchema);\n/** @public */ export const AudioStream = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::AudioStream\", AudioStreamSchema);\n/** @public */ export const AvatarAttach = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::AvatarAttach\", AvatarAttachSchema);\n/** @public */ export const AvatarModifierArea = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::AvatarModifierArea\", AvatarModifierAreaSchema);\n/** @public */ export const AvatarShape = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::AvatarShape\", AvatarShapeSchema);\n/** @public */ export const Billboard = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::Billboard\", BillboardSchema);\n/** @public */ export const CameraMode = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::CameraMode\", CameraModeSchema);\n/** @public */ export const CameraModeArea = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::CameraModeArea\", CameraModeAreaSchema);\n/** @public */ export const EngineInfo = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::EngineInfo\", EngineInfoSchema);\n/** @public */ export const GltfContainer = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::GltfContainer\", GltfContainerSchema);\n/** @public */ export const GltfContainerLoadingState = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::GltfContainerLoadingState\", GltfContainerLoadingStateSchema);\n/** @public */ export const Material = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::Material\", MaterialSchema);\n/** @public */ export const MeshCollider = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::MeshCollider\", MeshColliderSchema);\n/** @public */ export const MeshRenderer = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::MeshRenderer\", MeshRendererSchema);\n/** @public */ export const NftShape = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::NftShape\", NftShapeSchema);\n/** @public */ export const PointerEvents = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::PointerEvents\", PointerEventsSchema);\n/** @public */ export const PointerEventsResult = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema(\"core::PointerEventsResult\", PointerEventsResultSchema, {\n timestampFunction: (t) => t.timestamp,\n maxElements: 100\n});\n/** @public */ export const PointerLock = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::PointerLock\", PointerLockSchema);\n/** @public */ export const Raycast = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::Raycast\", RaycastSchema);\n/** @public */ export const RaycastResult = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::RaycastResult\", RaycastResultSchema);\n/** @public */ export const TextShape = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::TextShape\", TextShapeSchema);\n/** @public */ export const Tween = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::Tween\", TweenSchema);\n/** @public */ export const TweenSequence = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::TweenSequence\", TweenSequenceSchema);\n/** @public */ export const TweenState = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::TweenState\", TweenStateSchema);\n/** @public */ export const UiBackground = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiBackground\", UiBackgroundSchema);\n/** @public */ export const UiCanvasInformation = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiCanvasInformation\", UiCanvasInformationSchema);\n/** @public */ export const UiDropdown = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiDropdown\", UiDropdownSchema);\n/** @public */ export const UiDropdownResult = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiDropdownResult\", UiDropdownResultSchema);\n/** @public */ export const UiInput = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiInput\", UiInputSchema);\n/** @public */ export const UiInputResult = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiInputResult\", UiInputResultSchema);\n/** @public */ export const UiText = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiText\", UiTextSchema);\n/** @public */ export const UiTransform = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::UiTransform\", UiTransformSchema);\n/** @public */ export const VideoEvent = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema(\"core::VideoEvent\", VideoEventSchema, {\n timestampFunction: (t) => t.timestamp,\n maxElements: 100\n});\n/** @public */ export const VideoPlayer = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::VideoPlayer\", VideoPlayerSchema);\n/** @public */ export const VisibilityComponent = engine => \n/* @__PURE__ */ engine.defineComponentFromSchema(\"core::VisibilityComponent\", VisibilityComponentSchema);\n/** public */\nexport const componentDefinitionByName = /* @__PURE__ */ {\n \"core::Animator\": Animator,\n \"core::AudioSource\": AudioSource,\n \"core::AudioStream\": AudioStream,\n \"core::AvatarAttach\": AvatarAttach,\n \"core::AvatarModifierArea\": AvatarModifierArea,\n \"core::AvatarShape\": AvatarShape,\n \"core::Billboard\": Billboard,\n \"core::CameraMode\": CameraMode,\n \"core::CameraModeArea\": CameraModeArea,\n \"core::EngineInfo\": EngineInfo,\n \"core::GltfContainer\": GltfContainer,\n \"core::GltfContainerLoadingState\": GltfContainerLoadingState,\n \"core::Material\": Material,\n \"core::MeshCollider\": MeshCollider,\n \"core::MeshRenderer\": MeshRenderer,\n \"core::NftShape\": NftShape,\n \"core::PointerEvents\": PointerEvents,\n \"core::PointerEventsResult\": PointerEventsResult,\n \"core::PointerLock\": PointerLock,\n \"core::Raycast\": Raycast,\n \"core::RaycastResult\": RaycastResult,\n \"core::TextShape\": TextShape,\n \"core::Tween\": Tween,\n \"core::TweenSequence\": TweenSequence,\n \"core::TweenState\": TweenState,\n \"core::UiBackground\": UiBackground,\n \"core::UiCanvasInformation\": UiCanvasInformation,\n \"core::UiDropdown\": UiDropdown,\n \"core::UiDropdownResult\": UiDropdownResult,\n \"core::UiInput\": UiInput,\n \"core::UiInputResult\": UiInputResult,\n \"core::UiText\": UiText,\n \"core::UiTransform\": UiTransform,\n \"core::VideoEvent\": VideoEvent,\n \"core::VideoPlayer\": VideoPlayer,\n \"core::VisibilityComponent\": VisibilityComponent,\n};\n", "import { Animator } from '../generated/index.gen';\nexport function defineAnimatorComponent(engine) {\n const theComponent = Animator(engine);\n /**\n * @returns The tuple [animator, clip]\n */\n function getClipAndAnimator(entity, clipName) {\n const anim = theComponent.getMutableOrNull(entity);\n if (!anim)\n return [null, null];\n const state = anim.states.find((item) => item.clip === clipName);\n if (!state)\n return [anim, null];\n return [anim, state];\n }\n return {\n ...theComponent,\n getClipOrNull(entity, clipName) {\n const [_, state] = getClipAndAnimator(entity, clipName);\n return state;\n },\n getClip(entity, clipName) {\n const [animator, state] = getClipAndAnimator(entity, clipName);\n if (!animator) {\n throw new Error(`There is no Animator found in the entity ${entity}`);\n }\n if (!state) {\n throw new Error(`The Animator component of ${entity} has no the state ${clipName}`);\n }\n return state;\n },\n playSingleAnimation(entity, clipName, shouldReset = true) {\n const [animator, state] = getClipAndAnimator(entity, clipName);\n if (!animator || !state)\n return false;\n // Reset all other animations\n for (const state of animator.states) {\n state.playing = false;\n state.shouldReset = true;\n }\n state.playing = true;\n state.shouldReset = shouldReset;\n return true;\n },\n stopAllAnimations(entity, resetCursor = true) {\n // Get the mutable to modifying\n const animator = theComponent.getMutableOrNull(entity);\n if (!animator)\n return false;\n // Reset all other animations\n for (const state of animator.states) {\n state.playing = false;\n state.shouldReset = resetCursor;\n }\n return true;\n }\n };\n}\n", "import { Material } from '../generated/index.gen';\nconst TextureHelper = {\n Common(texture) {\n return {\n tex: {\n $case: 'texture',\n texture\n }\n };\n },\n Avatar(avatarTexture) {\n return {\n tex: {\n $case: 'avatarTexture',\n avatarTexture\n }\n };\n },\n Video(videoTexture) {\n return {\n tex: {\n $case: 'videoTexture',\n videoTexture\n }\n };\n }\n};\nexport function defineMaterialComponent(engine) {\n const theComponent = Material(engine);\n return {\n ...theComponent,\n Texture: TextureHelper,\n setBasicMaterial(entity, material) {\n theComponent.createOrReplace(entity, {\n material: {\n $case: 'unlit',\n unlit: material\n }\n });\n },\n setPbrMaterial(entity, material) {\n theComponent.createOrReplace(entity, {\n material: {\n $case: 'pbr',\n pbr: material\n }\n });\n }\n };\n}\n", "import { MeshCollider } from '../generated/index.gen';\nexport function defineMeshColliderComponent(engine) {\n const theComponent = MeshCollider(engine);\n function getCollisionMask(layers) {\n if (Array.isArray(layers)) {\n return layers.map((item) => item).reduce((prev, item) => prev | item, 0);\n }\n else if (layers) {\n return layers;\n }\n }\n return {\n ...theComponent,\n setBox(entity, colliderLayers) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'box', box: {} },\n collisionMask: getCollisionMask(colliderLayers)\n });\n },\n setPlane(entity, colliderLayers) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'plane', plane: {} },\n collisionMask: getCollisionMask(colliderLayers)\n });\n },\n setCylinder(entity, radiusBottom, radiusTop, colliderLayers) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'cylinder', cylinder: { radiusBottom, radiusTop } },\n collisionMask: getCollisionMask(colliderLayers)\n });\n },\n setSphere(entity, colliderLayers) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'sphere', sphere: {} },\n collisionMask: getCollisionMask(colliderLayers)\n });\n }\n };\n}\n", "import { MeshRenderer } from '../generated/index.gen';\nexport function defineMeshRendererComponent(engine) {\n const theComponent = MeshRenderer(engine);\n return {\n ...theComponent,\n setBox(entity, uvs) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'box', box: { uvs: uvs || [] } }\n });\n },\n setPlane(entity, uvs) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'plane', plane: { uvs: uvs || [] } }\n });\n },\n setCylinder(entity, radiusBottom, radiusTop) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'cylinder', cylinder: { radiusBottom, radiusTop } }\n });\n },\n setSphere(entity) {\n theComponent.createOrReplace(entity, {\n mesh: { $case: 'sphere', sphere: {} }\n });\n }\n };\n}\n", "import { Tween } from '../generated/index.gen';\nconst TweenHelper = {\n Move(move) {\n return {\n $case: 'move',\n move\n };\n },\n Rotate(rotate) {\n return {\n $case: 'rotate',\n rotate\n };\n },\n Scale(scale) {\n return {\n $case: 'scale',\n scale\n };\n }\n};\nexport function defineTweenComponent(engine) {\n const theComponent = Tween(engine);\n return {\n ...theComponent,\n Mode: TweenHelper\n };\n}\n", "/**\n * @internal\n */\nexport const IArray = (type) => {\n return {\n serialize(value, builder) {\n builder.writeUint32(value.length);\n for (const item of value) {\n type.serialize(item, builder);\n }\n },\n deserialize(reader) {\n const newArray = [];\n const length = reader.readUint32();\n for (let index = 0; index < length; index++) {\n newArray.push(type.deserialize(reader));\n }\n return newArray;\n },\n create() {\n return [];\n },\n jsonSchema: {\n type: 'array',\n items: type.jsonSchema,\n serializationType: 'array'\n }\n };\n};\n", "/**\n * @internal\n */\nexport const Bool = {\n serialize(value, builder) {\n builder.writeInt8(value ? 1 : 0);\n },\n deserialize(reader) {\n return reader.readInt8() === 1;\n },\n create() {\n return false;\n },\n jsonSchema: {\n type: 'boolean',\n serializationType: 'boolean'\n }\n};\n", "/**\n * @internal\n */\nexport const Int64 = {\n serialize(value, builder) {\n builder.writeInt64(BigInt(value));\n },\n deserialize(reader) {\n return Number(reader.readInt64());\n },\n create() {\n return 0;\n },\n jsonSchema: {\n type: 'integer',\n serializationType: 'int64'\n }\n};\n/**\n * @internal\n */\nexport const Int32 = {\n serialize(value, builder) {\n builder.writeInt32(value);\n },\n deserialize(reader) {\n return reader.readInt32();\n },\n create() {\n return 0;\n },\n jsonSchema: {\n type: 'integer',\n serializationType: 'int32'\n }\n};\n/**\n * @public\n */\nexport const Int16 = {\n serialize(value, builder) {\n builder.writeInt16(value);\n },\n deserialize(reader) {\n return reader.readInt16();\n },\n create() {\n return 0;\n },\n jsonSchema: {\n type: 'integer',\n serializationType: 'int16'\n }\n};\n/**\n * @public\n */\nexport const Int8 = {\n serialize(value, builder) {\n builder.writeInt8(value);\n },\n deserialize(reader) {\n return reader.readInt8();\n },\n create() {\n return 0;\n },\n jsonSchema: {\n type: 'integer',\n serializationType: 'int8'\n }\n};\n", "/**\n * @internal\n */\nexport const FlatString = {\n serialize(value, builder) {\n builder.writeUtf8String(value);\n },\n deserialize(reader) {\n return reader.readUtf8String();\n },\n create() {\n return '';\n },\n jsonSchema: {\n type: 'string',\n serializationType: 'utf8-string'\n }\n};\n/**\n * @internal\n */\nexport const EcsString = FlatString;\n", "import { Int32 } from './Integer';\nimport { FlatString } from './String';\n/**\n * Validates the enum to ensure all member values are numbers and within the range of Int32.\n * @param enumValue The enum to be checked.\n * @throws If any member value is not a number or is outside the range of Int32.\n */\nfunction validateMemberValuesAreNumbersAndInRangeInt32(enumValue) {\n const MIN_VALUE = -(2 ** 31), MAX_VALUE = 2 ** 31 - 1;\n let valueCount = 0, totalCount = 0;\n for (const key in enumValue) {\n if (typeof enumValue[key] === 'number') {\n if (enumValue[key] > MAX_VALUE || enumValue[key] < MIN_VALUE) {\n throw new Error(`Enum member values must be numbers within the range of ${MIN_VALUE} to ${MAX_VALUE}.`);\n }\n valueCount++;\n }\n totalCount++;\n }\n if (totalCount !== valueCount * 2) {\n throw new Error('All enum member values must be of numeric type.');\n }\n}\n/**\n * Validates the enum to ensure all member values are of string type.\n * @param enumValue The enum to be checked.\n * @throws If any member value is not of string type.\n */\nfunction validateMemberValuesAreStrings(enumValue) {\n for (const key in enumValue) {\n if (typeof enumValue[key] !== 'string') {\n throw new Error('All enum member values must be of string type.');\n }\n }\n}\n/**\n * @internal\n */\nexport const IntEnumReflectionType = 'enum-int';\n/**\n * @internal\n */\nexport const IntEnum = (enumObject, defaultValue) => {\n validateMemberValuesAreNumbersAndInRangeInt32(enumObject);\n return {\n serialize(value, builder) {\n Int32.serialize(value, builder);\n },\n deserialize(reader) {\n return Int32.deserialize(reader);\n },\n create() {\n return defaultValue;\n },\n jsonSchema: {\n // JSON-schema\n type: 'integer',\n enum: Object.values(enumObject).filter((item) => Number.isInteger(item)),\n default: defaultValue,\n // @dcl/ecs Schema Spec\n serializationType: IntEnumReflectionType,\n enumObject\n }\n };\n};\n/**\n * @internal\n */\nexport const StringEnumReflectionType = 'enum-string';\n/**\n * @internal\n */\nexport const StringEnum = (enumObject, defaultValue) => {\n validateMemberValuesAreStrings(enumObject);\n // String enum has the exact mapping from key (our reference in code) to values\n return {\n serialize(value, builder) {\n FlatString.serialize(value, builder);\n },\n deserialize(reader) {\n return FlatString.deserialize(reader);\n },\n create() {\n return defaultValue;\n },\n jsonSchema: {\n // JSON-schema\n type: 'string',\n enum: Object.values(enumObject),\n default: defaultValue,\n // @dcl/ecs Schema Spec\n serializationType: StringEnumReflectionType,\n enumObject\n }\n };\n};\n", "/**\n * @internal\n */\nexport const Float32 = {\n serialize(value, builder) {\n builder.writeFloat32(value);\n },\n deserialize(reader) {\n return reader.readFloat32();\n },\n create() {\n return 0.0;\n },\n jsonSchema: {\n type: 'number',\n serializationType: 'float32'\n }\n};\n/**\n * @internal\n */\nexport const Float64 = {\n serialize(value, builder) {\n builder.writeFloat64(value);\n },\n deserialize(reader) {\n return reader.readFloat64();\n },\n create() {\n return 0.0;\n },\n jsonSchema: {\n type: 'number',\n serializationType: 'float64'\n }\n};\n", "/**\n * @internal\n */\nexport const Color3Schema = {\n serialize(value, builder) {\n builder.writeFloat32(value.r);\n builder.writeFloat32(value.g);\n builder.writeFloat32(value.b);\n },\n deserialize(reader) {\n return {\n r: reader.readFloat32(),\n g: reader.readFloat32(),\n b: reader.readFloat32()\n };\n },\n create() {\n return { r: 0, g: 0, b: 0 };\n },\n jsonSchema: {\n type: 'object',\n properties: {\n r: { type: 'number' },\n g: { type: 'number' },\n b: { type: 'number' }\n },\n serializationType: 'color3'\n }\n};\n", "/**\n * @internal\n */\nexport const Color4Schema = {\n serialize(value, builder) {\n builder.writeFloat32(value.r);\n builder.writeFloat32(value.g);\n builder.writeFloat32(value.b);\n builder.writeFloat32(value.a);\n },\n deserialize(reader) {\n return {\n r: reader.readFloat32(),\n g: reader.readFloat32(),\n b: reader.readFloat32(),\n a: reader.readFloat32()\n };\n },\n create() {\n return { r: 0, g: 0, b: 0, a: 0 };\n },\n jsonSchema: {\n type: 'object',\n properties: {\n r: { type: 'number' },\n g: { type: 'number' },\n b: { type: 'number' },\n a: { type: 'number' }\n },\n serializationType: 'color4'\n }\n};\n", "/**\n * @internal\n */\nexport const EntitySchema = {\n serialize(value, builder) {\n builder.writeInt32(value);\n },\n deserialize(reader) {\n return reader.readInt32();\n },\n create() {\n return 0;\n },\n jsonSchema: {\n type: 'integer',\n serializationType: 'entity'\n }\n};\n", "/**\n * @internal\n */\nexport const QuaternionSchema = {\n serialize(value, builder) {\n builder.writeFloat32(value.x);\n builder.writeFloat32(value.y);\n builder.writeFloat32(value.z);\n builder.writeFloat32(value.w);\n },\n deserialize(reader) {\n return {\n x: reader.readFloat32(),\n y: reader.readFloat32(),\n z: reader.readFloat32(),\n w: reader.readFloat32()\n };\n },\n create() {\n return { x: 0, y: 0, z: 0, w: 0 };\n },\n jsonSchema: {\n type: 'object',\n properties: {\n x: { type: 'number' },\n y: { type: 'number' },\n z: { type: 'number' },\n w: { type: 'number' }\n },\n serializationType: 'quaternion'\n }\n};\n", "/**\n * @internal\n */\nexport const Vector3Schema = {\n serialize(value, builder) {\n builder.writeFloat32(value.x);\n builder.writeFloat32(value.y);\n builder.writeFloat32(value.z);\n },\n deserialize(reader) {\n return {\n x: reader.readFloat32(),\n y: reader.readFloat32(),\n z: reader.readFloat32()\n };\n },\n create() {\n return { x: 0, y: 0, z: 0 };\n },\n jsonSchema: {\n type: 'object',\n properties: {\n x: { type: 'number' },\n y: { type: 'number' },\n z: { type: 'number' },\n w: { type: 'number' }\n },\n serializationType: 'vector3'\n }\n};\n", "/**\n * @internal\n */\nexport const IMap = (spec, defaultValue) => {\n const specReflection = Object.keys(spec).reduce((specReflection, currentKey) => {\n specReflection[currentKey] = spec[currentKey].jsonSchema;\n return specReflection;\n }, {});\n return {\n serialize(value, builder) {\n for (const key in spec) {\n spec[key].serialize(value[key], builder);\n }\n },\n deserialize(reader) {\n const newValue = {};\n for (const key in spec) {\n ;\n newValue[key] = spec[key].deserialize(reader);\n }\n return newValue;\n },\n create() {\n const newValue = {};\n for (const key in spec) {\n ;\n newValue[key] = spec[key].create();\n }\n return { ...newValue, ...defaultValue };\n },\n extend: (base) => {\n const newValue = {};\n for (const key in spec) {\n ;\n newValue[key] = spec[key].create();\n }\n return { ...newValue, ...defaultValue, ...base };\n },\n jsonSchema: {\n type: 'object',\n properties: specReflection,\n serializationType: 'map'\n }\n };\n};\n", "/**\n * @internal\n */\nexport const IOptional = (spec) => {\n return {\n serialize(value, builder) {\n if (value) {\n builder.writeInt8(1);\n spec.serialize(value, builder);\n }\n else {\n builder.writeInt8(0);\n }\n },\n deserialize(reader) {\n const exists = reader.readInt8();\n if (exists) {\n return spec.deserialize(reader);\n }\n },\n create() {\n return undefined;\n },\n jsonSchema: {\n type: spec.jsonSchema.type,\n serializationType: 'optional',\n optionalJsonSchema: spec.jsonSchema\n }\n };\n};\n", "export const IOneOf = (specs) => {\n const specKeys = Object.keys(specs);\n const keyToIndex = specKeys.reduce((dict, key, index) => {\n dict[key] = index;\n return dict;\n }, {});\n const specReflection = specKeys.reduce((specReflection, currentKey) => {\n specReflection[currentKey] = specs[currentKey].jsonSchema;\n return specReflection;\n }, {});\n return {\n serialize({ $case, value }, builder) {\n const _value = keyToIndex[$case.toString()] + 1;\n builder.writeUint8(_value);\n specs[$case].serialize(value, builder);\n },\n deserialize(reader) {\n const $case = specKeys[reader.readInt8() - 1];\n const value = specs[$case].deserialize(reader);\n return { $case, value };\n },\n create() {\n return {};\n },\n jsonSchema: {\n type: 'object',\n properties: specReflection,\n serializationType: 'one-of'\n }\n };\n};\n", "export const isSchemaType = (value, types) => types.includes(value.serializationType);\nexport const isOneOfJsonSchema = (type) => isSchemaType(type, ['one-of']);\nexport const getUnknownSchema = () => ({\n type: { type: 'object', serializationType: 'unknown' },\n value: undefined\n});\nexport const isCompoundType = (type) => isSchemaType(type, ['array', 'map']);\nexport const getTypeAndValue = (properties, value, key) => {\n const type = properties[key];\n const valueKey = value[key];\n if (isOneOfJsonSchema(type)) {\n const typedMapValue = valueKey;\n if (!typedMapValue.$case)\n return getUnknownSchema();\n const propType = type.properties[typedMapValue.$case];\n // transform { $case: string; value: unknown } => { [$case]: value }\n if (isCompoundType(propType))\n value[key] = { [typedMapValue.$case]: typedMapValue.value };\n return { type: propType, value: typedMapValue.value };\n }\n return { type, value: valueKey };\n};\n", "import { IArray } from '../Array';\nimport { Bool } from '../basic/Boolean';\nimport { IntEnum, StringEnum } from '../basic/Enum';\nimport { Float32, Float64 } from '../basic/Float';\nimport { Int16, Int32, Int64, Int8 } from '../basic/Integer';\nimport { EcsString } from '../basic/String';\nimport { Color3Schema } from '../custom/Color3';\nimport { Color4Schema } from '../custom/Color4';\nimport { EntitySchema } from '../custom/Entity';\nimport { QuaternionSchema } from '../custom/Quaternion';\nimport { Vector3Schema } from '../custom/Vector3';\nimport { IMap } from '../Map';\nimport { IOneOf } from '../OneOf';\nimport { IOptional } from '../Optional';\nimport { getTypeAndValue, isCompoundType } from './utils';\nconst primitiveSchemas = {\n [Bool.jsonSchema.serializationType]: Bool,\n [EcsString.jsonSchema.serializationType]: EcsString,\n [Float32.jsonSchema.serializationType]: Float32,\n [Float64.jsonSchema.serializationType]: Float64,\n [Int8.jsonSchema.serializationType]: Int8,\n [Int16.jsonSchema.serializationType]: Int16,\n [Int32.jsonSchema.serializationType]: Int32,\n [Int64.jsonSchema.serializationType]: Int64,\n [Vector3Schema.jsonSchema.serializationType]: Vector3Schema,\n [QuaternionSchema.jsonSchema.serializationType]: QuaternionSchema,\n [Color3Schema.jsonSchema.serializationType]: Color3Schema,\n [Color4Schema.jsonSchema.serializationType]: Color4Schema,\n [EntitySchema.jsonSchema.serializationType]: EntitySchema\n};\n/**\n * Create an ISchema object from the json-schema\n * @param jsonSchema\n * @returns a ISchema or fail for unsupported json-schema\n */\nexport function jsonSchemaToSchema(jsonSchema) {\n if (primitiveSchemas[jsonSchema.serializationType]) {\n return primitiveSchemas[jsonSchema.serializationType];\n }\n if (jsonSchema.serializationType === 'map') {\n const mapJsonSchema = jsonSchema;\n const spec = {};\n for (const key in mapJsonSchema.properties) {\n spec[key] = jsonSchemaToSchema(mapJsonSchema.properties[key]);\n }\n return IMap(spec);\n }\n if (jsonSchema.serializationType === 'optional') {\n const withItemsJsonSchema = jsonSchema;\n return IOptional(jsonSchemaToSchema(withItemsJsonSchema.optionalJsonSchema));\n }\n if (jsonSchema.serializationType === 'array') {\n const withItemsJsonSchema = jsonSchema;\n return IArray(jsonSchemaToSchema(withItemsJsonSchema.items));\n }\n if (jsonSchema.serializationType === 'enum-int') {\n const enumJsonSchema = jsonSchema;\n return IntEnum(enumJsonSchema.enumObject, enumJsonSchema.default);\n }\n if (jsonSchema.serializationType === 'enum-string') {\n const enumJsonSchema = jsonSchema;\n return StringEnum(enumJsonSchema.enumObject, enumJsonSchema.default);\n }\n if (jsonSchema.serializationType === 'one-of') {\n const oneOfJsonSchema = jsonSchema;\n const spec = {};\n for (const key in oneOfJsonSchema.properties) {\n spec[key] = jsonSchemaToSchema(oneOfJsonSchema.properties[key]);\n }\n return IOneOf(spec);\n }\n throw new Error(`${jsonSchema.serializationType} is not supported as reverse schema generation.`);\n}\nexport function mutateValues(jsonSchema, value, mutateFn) {\n if (jsonSchema.serializationType === 'map') {\n const { properties } = jsonSchema;\n const typedValue = value;\n for (const key in properties) {\n const { type, value: mapValue } = getTypeAndValue(properties, typedValue, key);\n if (type.serializationType === 'unknown')\n continue;\n if (isCompoundType(type)) {\n mutateValues(type, mapValue, mutateFn);\n }\n else {\n const newValue = mutateFn(mapValue, type);\n if (newValue.changed) {\n typedValue[key] = newValue.value;\n }\n }\n }\n }\n else if (jsonSchema.serializationType === 'array') {\n const { items } = jsonSchema;\n const arrayValue = value;\n for (let i = 0, n = arrayValue.length; i < n; i++) {\n const { type, value } = getTypeAndValue({ items: items }, { items: arrayValue[i] }, 'items');\n if (isCompoundType(type)) {\n mutateValues(type, value, mutateFn);\n }\n else {\n const newValue = mutateFn(value, type);\n if (newValue.changed) {\n arrayValue[i] = newValue.value;\n }\n }\n }\n }\n}\n", "import { IArray } from './Array';\nimport { Bool } from './basic/Boolean';\nimport { IntEnum as IntEnumSchema, StringEnum as StringEnumSchema } from './basic/Enum';\nimport { Float32, Float64 } from './basic/Float';\nimport { Int16, Int32, Int8, Int64 as iInt64 } from './basic/Integer';\nimport { EcsString } from './basic/String';\nimport { Color3Schema } from './custom/Color3';\nimport { Color4Schema } from './custom/Color4';\nimport { EntitySchema } from './custom/Entity';\nimport { QuaternionSchema } from './custom/Quaternion';\nimport { Vector3Schema } from './custom/Vector3';\nimport { IMap } from './Map';\nimport { IOptional } from './Optional';\nimport { IOneOf } from './OneOf';\nimport { jsonSchemaToSchema, mutateValues } from './buildSchema';\n/**\n * @public\n */\nexport var Schemas;\n(function (Schemas) {\n /** @public */\n Schemas.Boolean = Bool;\n /** @public */\n Schemas.String = EcsString;\n /** @public */\n Schemas.Float = Float32;\n /** @public */\n Schemas.Double = Float64;\n /** @public */\n Schemas.Byte = Int8;\n /** @public */\n Schemas.Short = Int16;\n /** @public */\n Schemas.Int = Int32;\n /** @public */\n Schemas.Int64 = iInt64;\n /** @public */\n Schemas.Number = Float32;\n /** @public */\n Schemas.Vector3 = Vector3Schema;\n /** @public */\n Schemas.Quaternion = QuaternionSchema;\n /** @public */\n Schemas.Color3 = Color3Schema;\n /** @public */\n Schemas.Color4 = Color4Schema;\n /** @public */\n Schemas.Entity = EntitySchema;\n /** @public */\n Schemas.EnumNumber = IntEnumSchema;\n /** @public */\n Schemas.EnumString = StringEnumSchema;\n /** @public */\n Schemas.Array = IArray;\n /** @public */\n Schemas.Map = IMap;\n /** @public */\n Schemas.Optional = IOptional;\n /** @public */\n Schemas.OneOf = IOneOf;\n /**\n * @public Create an ISchema object from the json-schema\n * @param jsonSchema\n * @returns a ISchema or fail for unsupported json-schema\n */\n Schemas.fromJson = jsonSchemaToSchema;\n /**\n * @public\n *\n * Traverses and mutates values in a JSON schema-based structure, applying the given mutation function to each value.\n * The function is designed to work with nested maps and arrays, recursively processing each element.\n *\n * @param jsonSchema - The JSON schema object that describes the structure of the value.\n * It must have a serializationType of 'map', 'array', or other custom types like 'entity'.\n * @param value - The value to be mutated, which should conform to the provided JSON schema.\n * @param mutateFn - A function that takes a value and its corresponding valueType (JsonSchemaExtended) as arguments\n * and returns a tuple [boolean, any]. The boolean indicates whether the mutation should be applied,\n * and the second element is the mutated value.\n */\n Schemas.mutateNestedValues = mutateValues;\n})(Schemas || (Schemas = {}));\n", "import { Schemas } from '../../schemas';\nfunction defineNameComponent(engine) {\n const Name = engine.defineComponent('core-schema::Name', {\n value: Schemas.String\n });\n return Name;\n}\nexport default defineNameComponent;\n", "import { Schemas } from '../../schemas';\nfunction defineSyncComponents(engine) {\n const SyncComponents = engine.defineComponent('core-schema::Sync-Components', {\n componentIds: Schemas.Array(Schemas.Int64)\n });\n return SyncComponents;\n}\nexport default defineSyncComponents;\n", "import { Schemas } from '../../schemas';\nfunction defineNetworkEntityComponent(engine) {\n const EntityNetwork = engine.defineComponent('core-schema::Network-Entity', {\n networkId: Schemas.Int64,\n entityId: Schemas.Entity\n });\n return EntityNetwork;\n}\nexport default defineNetworkEntityComponent;\n", "import { Schemas } from '../../schemas';\nfunction defineNetworkParentComponent(engine) {\n const EntityNetwork = engine.defineComponent('core-schema::Network-Parent', {\n networkId: Schemas.Int64,\n entityId: Schemas.Entity\n });\n return EntityNetwork;\n}\nexport default defineNetworkParentComponent;\n", "/**\n * @internal\n */\nexport const COMPONENT_ID = 1;\n/** @internal */\nexport const TRANSFORM_LENGTH = 44;\n/** @internal */\nexport const TransformSchema = {\n serialize(value, builder) {\n const ptr = builder.incrementWriteOffset(TRANSFORM_LENGTH);\n builder.setFloat32(ptr, value.position.x);\n builder.setFloat32(ptr + 4, value.position.y);\n builder.setFloat32(ptr + 8, value.position.z);\n builder.setFloat32(ptr + 12, value.rotation.x);\n builder.setFloat32(ptr + 16, value.rotation.y);\n builder.setFloat32(ptr + 20, value.rotation.z);\n builder.setFloat32(ptr + 24, value.rotation.w);\n builder.setFloat32(ptr + 28, value.scale.x);\n builder.setFloat32(ptr + 32, value.scale.y);\n builder.setFloat32(ptr + 36, value.scale.z);\n builder.setUint32(ptr + 40, value.parent || 0);\n },\n deserialize(reader) {\n const ptr = reader.incrementReadOffset(TRANSFORM_LENGTH);\n return {\n position: {\n x: reader.getFloat32(ptr),\n y: reader.getFloat32(ptr + 4),\n z: reader.getFloat32(ptr + 8)\n },\n rotation: {\n x: reader.getFloat32(ptr + 12),\n y: reader.getFloat32(ptr + 16),\n z: reader.getFloat32(ptr + 20),\n w: reader.getFloat32(ptr + 24)\n },\n scale: {\n x: reader.getFloat32(ptr + 28),\n y: reader.getFloat32(ptr + 32),\n z: reader.getFloat32(ptr + 36)\n },\n parent: reader.getUint32(ptr + 40)\n };\n },\n create() {\n return {\n position: { x: 0, y: 0, z: 0 },\n scale: { x: 1, y: 1, z: 1 },\n rotation: { x: 0, y: 0, z: 0, w: 1 },\n parent: 0\n };\n },\n extend(value) {\n return {\n position: { x: 0, y: 0, z: 0 },\n scale: { x: 1, y: 1, z: 1 },\n rotation: { x: 0, y: 0, z: 0, w: 1 },\n parent: 0,\n ...value\n };\n },\n jsonSchema: {\n type: 'object',\n properties: {\n position: {\n type: 'object',\n properties: {\n x: { type: 'number' },\n y: { type: 'number' },\n z: { type: 'number' }\n }\n },\n scale: {\n type: 'object',\n properties: {\n x: { type: 'number' },\n y: { type: 'number' },\n z: { type: 'number' }\n }\n },\n rotation: {\n type: 'object',\n properties: {\n x: { type: 'number' },\n y: { type: 'number' },\n z: { type: 'number' },\n w: { type: 'number' }\n }\n },\n parent: { type: 'integer' }\n },\n serializationType: 'transform'\n }\n};\nexport function defineTransformComponent(engine) {\n const transformDef = engine.defineComponentFromSchema('core::Transform', TransformSchema);\n return {\n ...transformDef,\n create(entity, val) {\n return transformDef.create(entity, TransformSchema.extend(val));\n },\n createOrReplace(entity, val) {\n return transformDef.createOrReplace(entity, TransformSchema.extend(val));\n }\n };\n}\n", "import { defineAnimatorComponent } from './extended/Animator';\nimport { defineMaterialComponent } from './extended/Material';\nimport { defineMeshColliderComponent } from './extended/MeshCollider';\nimport { defineMeshRendererComponent } from './extended/MeshRenderer';\nimport { defineTweenComponent } from './extended/Tween';\nimport defineNameComponent from './manual/Name';\nimport defineSyncComponent from './manual/SyncComponents';\nimport defineNetworkEntity from './manual/NetworkEntity';\nimport defineNetworkParent from './manual/NetworkParent';\nimport { defineTransformComponent } from './manual/Transform';\nexport * from './generated/index.gen';\n/* @__PURE__ */\nexport const Transform = (engine) => defineTransformComponent(engine);\n/* @__PURE__ */\nexport const Material = (engine) => defineMaterialComponent(engine);\n/* @__PURE__ */\nexport const Animator = (engine) => defineAnimatorComponent(engine);\n/* @__PURE__ */\nexport const MeshRenderer = (engine) => defineMeshRendererComponent(engine);\n/* @__PURE__ */\nexport const MeshCollider = (engine) => defineMeshColliderComponent(engine);\n/* @__PURE__ */\nexport const Tween = (engine) => defineTweenComponent(engine);\n/**\n * @alpha\n */\n/* @__PURE__ */\nexport const Name = (engine) => defineNameComponent(engine);\n/**\n * @alpha\n */\n/* @__PURE__ */\nexport const SyncComponents = (engine) => defineSyncComponent(engine);\n/**\n * @alpha\n */\n/* @__PURE__ */\nexport const NetworkEntity = (engine) => defineNetworkEntity(engine);\n/**\n * @alpha\n */\n/* @__PURE__ */\nexport const NetworkParent = (engine) => defineNetworkParent(engine);\n", "/**\n * Autogenerated mapping of core components to their component numbers\n */\nexport const coreComponentMappings = {\n \"core::Transform\": 1,\n \"core::Animator\": 1042,\n \"core::AudioSource\": 1020,\n \"core::AudioStream\": 1021,\n \"core::AvatarAttach\": 1073,\n \"core::AvatarBase\": 1087,\n \"core::AvatarEmoteCommand\": 1088,\n \"core::AvatarEquippedData\": 1091,\n \"core::AvatarModifierArea\": 1070,\n \"core::AvatarShape\": 1080,\n \"core::Billboard\": 1090,\n \"core::CameraMode\": 1072,\n \"core::CameraModeArea\": 1071,\n \"core::EngineInfo\": 1048,\n \"core::GltfContainer\": 1041,\n \"core::GltfContainerLoadingState\": 1049,\n \"core::Material\": 1017,\n \"core::MeshCollider\": 1019,\n \"core::MeshRenderer\": 1018,\n \"core::NftShape\": 1040,\n \"core::PlayerIdentityData\": 1089,\n \"core::PointerEvents\": 1062,\n \"core::PointerEventsResult\": 1063,\n \"core::PointerLock\": 1074,\n \"core::Raycast\": 1067,\n \"core::RaycastResult\": 1068,\n \"core::TextShape\": 1030,\n \"core::Tween\": 1102,\n \"core::TweenSequence\": 1104,\n \"core::TweenState\": 1103,\n \"core::UiBackground\": 1053,\n \"core::UiCanvasInformation\": 1054,\n \"core::UiDropdown\": 1094,\n \"core::UiDropdownResult\": 1096,\n \"core::UiInput\": 1093,\n \"core::UiInputResult\": 1095,\n \"core::UiText\": 1052,\n \"core::UiTransform\": 1050,\n \"core::VideoEvent\": 1044,\n \"core::VideoPlayer\": 1043,\n \"core::VisibilityComponent\": 1081\n};\n", "import { coreComponentMappings } from './generated/component-names.gen';\nimport * as utf8 from '@protobufjs/utf8';\nimport { unsignedCRC32 } from '../runtime/crc';\n// Max possible pre-defined (static) component.\nexport const MAX_STATIC_COMPONENT = 1 << 11; // 2048\n/**\n * All components that are not part of the coreComponentMappings MUST yield\n * a componentNumber (componentId) greather than MAX_STATIC_COMPONENT.\n * For that reason, we simply add MAX_STATIC_COMPONENT and trim to the domain 2^32\n */\nexport function componentNumberFromName(componentName) {\n if (coreComponentMappings[componentName])\n return coreComponentMappings[componentName];\n const bytes = new Uint8Array(128);\n utf8.write(componentName, bytes, 0);\n return ((unsignedCRC32(bytes) + MAX_STATIC_COMPONENT) & 4294967295) >>> 0;\n}\n", "const CRC_TABLE = new Int32Array([\n 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832,\n 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,\n 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a,\n 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,\n 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,\n 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,\n 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab,\n 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,\n 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4,\n 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,\n 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074,\n 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,\n 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525,\n 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,\n 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,\n 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,\n 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76,\n 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,\n 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6,\n 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,\n 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7,\n 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,\n 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7,\n 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,\n 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,\n 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,\n 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330,\n 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,\n 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d\n]);\nfunction _crc32(buf, previous) {\n let crc = ~~previous ^ -1;\n for (let n = 0; n < buf.length; n++) {\n crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8);\n }\n return crc ^ -1;\n}\nexport function unsignedCRC32(data, prev = 0) {\n return _crc32(data, prev) >>> 0;\n}\n", "/* istanbul ignore file */\nexport const __DEV__ = (typeof DEBUG === 'boolean' && DEBUG) ||\n (typeof process === 'object' &&\n (process.env?.NODE_ENV !== 'production' || process.env?.NODE_ENV === 'development')) ||\n false;\nexport function checkNotThenable(t, error) {\n if (__DEV__) {\n if (t && typeof t === 'object' && typeof t.then === 'function') {\n throw new Error(error);\n }\n }\n return t;\n}\n", "/**\n *\n * @returns a new GSet\n */\nexport function createVersionGSet() {\n const lastVersion = new Map();\n return {\n /**\n *\n * @param number\n * @param version\n * @returns\n */\n addTo(number, version) {\n /* istanbul ignore next */\n if (version < 0) {\n /* istanbul ignore next */\n return false;\n }\n const currentValue = lastVersion.get(number);\n // If the version is >=, it means the value it's already in the set\n if (currentValue !== undefined && currentValue >= version) {\n return true;\n }\n lastVersion.set(number, version);\n return true;\n },\n /**\n * @returns the set with [number, version] of each value\n */\n has(n, v) {\n const currentValue = lastVersion.get(n);\n // If the version is >=, it means the value it's already in the set\n if (currentValue !== undefined && currentValue >= v) {\n return true;\n }\n return false;\n },\n /**\n * Warning: this function returns the reference to the internal map,\n * if you need to mutate some value, make a copy.\n * For optimization purpose the copy isn't made here.\n *\n * @returns the map of number to version\n */\n getMap() {\n return lastVersion;\n }\n };\n}\n", "import { createVersionGSet } from '../systems/crdt/gset';\n/**\n * @internal\n */\nexport const MAX_U16 = 0xffff;\nconst MASK_UPPER_16_ON_32 = 0xffff0000;\n/**\n * @internal\n */\nexport const AMOUNT_VERSION_AVAILABLE = MAX_U16 + 1;\n// This type matches with @dcl/crdt entity type.\n/**\n * @internal\n */\nexport const MAX_ENTITY_NUMBER = MAX_U16;\n/**\n * This first 512 entities are reserved by the renderer\n */\nexport const RESERVED_STATIC_ENTITIES = 512;\n// Max amount of local entities that can be created\nexport const RESERVED_LOCAL_ENTITIES = MAX_ENTITY_NUMBER;\n/**\n * @public\n */\nexport var EntityUtils;\n(function (EntityUtils) {\n /**\n * @returns [entityNumber, entityVersion]\n */\n function fromEntityId(entityId) {\n return [(entityId & MAX_U16) >>> 0, (((entityId & MASK_UPPER_16_ON_32) >> 16) & MAX_U16) >>> 0];\n }\n EntityUtils.fromEntityId = fromEntityId;\n /**\n * @returns compound number from entityNumber and entityVerison\n */\n function toEntityId(entityNumber, entityVersion) {\n return (((entityNumber & MAX_U16) | ((entityVersion & MAX_U16) << 16)) >>> 0);\n }\n EntityUtils.toEntityId = toEntityId;\n})(EntityUtils || (EntityUtils = {}));\n/**\n * @public\n */\nexport var EntityState;\n(function (EntityState) {\n EntityState[EntityState[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * The entity was generated and added to the usedEntities set\n */\n EntityState[EntityState[\"UsedEntity\"] = 1] = \"UsedEntity\";\n /**\n * The entity was removed from current engine or remotely\n */\n EntityState[EntityState[\"Removed\"] = 2] = \"Removed\";\n /**\n * The entity is reserved number.\n */\n EntityState[EntityState[\"Reserved\"] = 3] = \"Reserved\";\n})(EntityState || (EntityState = {}));\n/**\n * @internal\n */\nexport function EntityContainer() {\n // Local entities counter\n let entityCounter = RESERVED_STATIC_ENTITIES;\n // Network entities counter\n let networkEntityCounter;\n // Network entities range that can be created by the user\n let networkedEntitiesRange;\n const usedEntities = new Set();\n let toRemoveEntities = [];\n const removedEntities = createVersionGSet();\n let localEntitiesAvailable = RESERVED_LOCAL_ENTITIES;\n function setNetworkEntitiesRange(reservedLocalEntities, range) {\n localEntitiesAvailable = reservedLocalEntities;\n networkedEntitiesRange = range;\n networkEntityCounter = range[0];\n }\n function generateNewEntity(networked) {\n if (entityCounter > MAX_ENTITY_NUMBER - 1) {\n throw new Error(`It fails trying to generate an entity out of range ${MAX_ENTITY_NUMBER}.`);\n }\n if (networked && networkEntityCounter > networkedEntitiesRange[1]) {\n throw new Error(`Max amount of network entities reached ${networkedEntitiesRange[1]} `);\n }\n if (!networked && entityCounter >= localEntitiesAvailable) {\n throw new Error(`Max amount of local entities reached ${localEntitiesAvailable}`);\n }\n const entityNumber = networked ? networkEntityCounter++ : entityCounter++;\n const entityVersion = removedEntities.getMap().has(entityNumber)\n ? removedEntities.getMap().get(entityNumber) + 1\n : 0;\n const entity = EntityUtils.toEntityId(entityNumber, entityVersion);\n if (usedEntities.has(entity)) {\n return generateNewEntity();\n }\n usedEntities.add(entity);\n return entity;\n }\n function generateEntity(networked) {\n if (networked && !networkedEntitiesRange) {\n throw new Error('Network entities ranged not initialized. Connect to a CRDT Server');\n }\n const usedNetworkSize = (networkedEntitiesRange &&\n [...usedEntities.values()].filter(($) => {\n const [entityId] = EntityUtils.fromEntityId($);\n return entityId >= networkedEntitiesRange[0] && entityId <= networkedEntitiesRange[1];\n }).length) ??\n 0;\n const usedSize = usedEntities.size - usedNetworkSize;\n // If all entities until `entityCounter` are being used, we need to generate another one\n if (!networked && usedSize + RESERVED_STATIC_ENTITIES >= entityCounter) {\n return generateNewEntity(networked);\n }\n // If all entities until `entityCounter` are being used, we need to generate another one\n if (networked && usedNetworkSize + networkedEntitiesRange[0] >= networkEntityCounter) {\n return generateNewEntity(networked);\n }\n for (const [number, version] of removedEntities.getMap()) {\n if (version < MAX_U16) {\n if (networked && (number < networkedEntitiesRange[0] || number > networkedEntitiesRange[1]))\n continue;\n if (!networked && number >= localEntitiesAvailable)\n continue;\n const entity = EntityUtils.toEntityId(number, version + 1);\n // If the entity is not being used, we can re-use it\n // If the entity was removed in this tick, we're not counting for the usedEntities, but we have it in the toRemoveEntityArray\n if (!usedEntities.has(entity) && !toRemoveEntities.includes(entity)) {\n usedEntities.add(entity);\n return entity;\n }\n }\n }\n return generateNewEntity(networked);\n }\n function removeEntity(entity) {\n if (entity < RESERVED_STATIC_ENTITIES)\n return false;\n if (usedEntities.has(entity)) {\n usedEntities.delete(entity);\n toRemoveEntities.push(entity);\n }\n else {\n updateRemovedEntity(entity);\n }\n return true;\n }\n function releaseRemovedEntities() {\n const arr = toRemoveEntities;\n if (arr.length) {\n toRemoveEntities = [];\n for (const entity of arr) {\n const [n, v] = EntityUtils.fromEntityId(entity);\n removedEntities.addTo(n, v);\n }\n }\n return arr;\n }\n function updateRemovedEntity(entity) {\n const [n, v] = EntityUtils.fromEntityId(entity);\n // Update the removed entities map\n removedEntities.addTo(n, v);\n // Remove the usedEntities if exist\n for (let i = 0; i <= v; i++) {\n usedEntities.delete(EntityUtils.toEntityId(n, i));\n }\n return true;\n }\n function updateUsedEntity(entity) {\n const [n, v] = EntityUtils.fromEntityId(entity);\n // if the entity was removed then abort fast\n if (removedEntities.has(n, v))\n return false;\n // Update\n if (v > 0) {\n for (let i = 0; i <= v - 1; i++) {\n usedEntities.delete(EntityUtils.toEntityId(n, i));\n }\n removedEntities.addTo(n, v - 1);\n }\n usedEntities.add(entity);\n return true;\n }\n function getEntityState(entity) {\n const [n, v] = EntityUtils.fromEntityId(entity);\n if (n < RESERVED_STATIC_ENTITIES) {\n return EntityState.Reserved;\n }\n if (usedEntities.has(entity)) {\n return EntityState.UsedEntity;\n }\n const removedVersion = removedEntities.getMap().get(n);\n if (removedVersion !== undefined && removedVersion >= v) {\n return EntityState.Removed;\n }\n return EntityState.Unknown;\n }\n return {\n setNetworkEntitiesRange,\n generateEntity,\n removeEntity,\n getExistingEntities() {\n return new Set(usedEntities);\n },\n getEntityState,\n releaseRemovedEntities,\n updateRemovedEntity,\n updateUsedEntity\n };\n}\n", "var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _ReadWriteByteBuffer_instances, _ReadWriteByteBuffer_woAdd, _ReadWriteByteBuffer_roAdd;\nimport * as utf8 from '@protobufjs/utf8';\n/**\n * Take the max between currentSize and intendedSize and then plus 1024. Then,\n * find the next nearer multiple of 1024.\n * @param currentSize - number\n * @param intendedSize - number\n * @returns the calculated number\n */\nfunction getNextSize(currentSize, intendedSize) {\n const minNewSize = Math.max(currentSize, intendedSize) + 1024;\n return Math.ceil(minNewSize / 1024) * 1024;\n}\nconst defaultInitialCapacity = 10240;\n/**\n * ByteBuffer is a wrapper of DataView which also adds a read and write offset.\n * Also in a write operation it resizes the buffer is being used if it needs.\n *\n * - Use read and write function to generate or consume data.\n * - Use set and get only if you are sure that you're doing.\n *\n * It always passes littleEndian param as true\n */\nexport class ReadWriteByteBuffer {\n /**\n * @param buffer - The initial buffer, provide a buffer if you need to set \"initial capacity\"\n * @param readingOffset - Set the cursor where begins to read. Default 0\n * @param writingOffset - Set the cursor to not start writing from the begin of it. Defaults to the buffer size\n */\n constructor(buffer, readingOffset, writingOffset) {\n _ReadWriteByteBuffer_instances.add(this);\n this._buffer = buffer || new Uint8Array(defaultInitialCapacity);\n this.view = new DataView(this._buffer.buffer, this._buffer.byteOffset);\n this.woffset = writingOffset ?? (buffer ? this._buffer.length : null) ?? 0;\n this.roffset = readingOffset ?? 0;\n }\n buffer() {\n return this._buffer;\n }\n bufferLength() {\n return this._buffer.length;\n }\n resetBuffer() {\n this.roffset = 0;\n this.woffset = 0;\n }\n currentReadOffset() {\n return this.roffset;\n }\n currentWriteOffset() {\n return this.woffset;\n }\n incrementReadOffset(amount) {\n return __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, amount);\n }\n remainingBytes() {\n return this.woffset - this.roffset;\n }\n readFloat32() {\n return this.view.getFloat32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true\n }\n readFloat64() {\n return this.view.getFloat64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 8), true); // littleEndian = true\n }\n readInt8() {\n return this.view.getInt8(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 1));\n }\n readInt16() {\n return this.view.getInt16(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 2), true); // littleEndian = true\n }\n readInt32() {\n return this.view.getInt32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true\n }\n readInt64() {\n return this.view.getBigInt64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 8), true); // littleEndian = true\n }\n readUint8() {\n return this.view.getUint8(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 1));\n }\n readUint16() {\n return this.view.getUint16(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 2), true); // littleEndian = true\n }\n readUint32() {\n return this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true\n }\n readUint64() {\n return this.view.getBigUint64(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 8), true); // littleEndian = true\n }\n readBuffer() {\n const length = this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true\n return this._buffer.subarray(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, length), __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 0));\n }\n readUtf8String() {\n const length = this.view.getUint32(__classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 4), true); // littleEndian = true\n return utf8.read(this._buffer, __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, length), __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_roAdd).call(this, 0));\n }\n incrementWriteOffset(amount) {\n return __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, amount);\n }\n toBinary() {\n return this._buffer.subarray(0, this.woffset);\n }\n toCopiedBinary() {\n return new Uint8Array(this.toBinary());\n }\n writeBuffer(value, writeLength = true) {\n if (writeLength) {\n this.writeUint32(value.byteLength);\n }\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, value.byteLength);\n this._buffer.set(value, o);\n }\n writeUtf8String(value, writeLength = true) {\n const byteLength = utf8.length(value);\n if (writeLength) {\n this.writeUint32(byteLength);\n }\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, byteLength);\n utf8.write(value, this._buffer, o);\n }\n writeFloat32(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 4);\n this.view.setFloat32(o, value, true); // littleEndian = true\n }\n writeFloat64(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 8);\n this.view.setFloat64(o, value, true); // littleEndian = true\n }\n writeInt8(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 1);\n this.view.setInt8(o, value);\n }\n writeInt16(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 2);\n this.view.setInt16(o, value, true); // littleEndian = true\n }\n writeInt32(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 4);\n this.view.setInt32(o, value, true); // littleEndian = true\n }\n writeInt64(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 8);\n this.view.setBigInt64(o, value, true); // littleEndian = true\n }\n writeUint8(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 1);\n this.view.setUint8(o, value);\n }\n writeUint16(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 2);\n this.view.setUint16(o, value, true); // littleEndian = true\n }\n writeUint32(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 4);\n this.view.setUint32(o, value, true); // littleEndian = true\n }\n writeUint64(value) {\n const o = __classPrivateFieldGet(this, _ReadWriteByteBuffer_instances, \"m\", _ReadWriteByteBuffer_woAdd).call(this, 8);\n this.view.setBigUint64(o, value, true); // littleEndian = true\n }\n // DataView Proxy\n getFloat32(offset) {\n return this.view.getFloat32(offset, true); // littleEndian = true\n }\n getFloat64(offset) {\n return this.view.getFloat64(offset, true); // littleEndian = true\n }\n getInt8(offset) {\n return this.view.getInt8(offset);\n }\n getInt16(offset) {\n return this.view.getInt16(offset, true); // littleEndian = true\n }\n getInt32(offset) {\n return this.view.getInt32(offset, true); // littleEndian = true\n }\n getInt64(offset) {\n return this.view.getBigInt64(offset, true); // littleEndian = true\n }\n getUint8(offset) {\n return this.view.getUint8(offset);\n }\n getUint16(offset) {\n return this.view.getUint16(offset, true); // littleEndian = true\n }\n getUint32(offset) {\n return this.view.getUint32(offset, true); // littleEndian = true >>> 0\n }\n getUint64(offset) {\n return this.view.getBigUint64(offset, true); // littleEndian = true\n }\n setFloat32(offset, value) {\n this.view.setFloat32(offset, value, true); // littleEndian = true\n }\n setFloat64(offset, value) {\n this.view.setFloat64(offset, value, true); // littleEndian = true\n }\n setInt8(offset, value) {\n this.view.setInt8(offset, value);\n }\n setInt16(offset, value) {\n this.view.setInt16(offset, value, true); // littleEndian = true\n }\n setInt32(offset, value) {\n this.view.setInt32(offset, value, true); // littleEndian = true\n }\n setInt64(offset, value) {\n this.view.setBigInt64(offset, value, true); // littleEndian = true\n }\n setUint8(offset, value) {\n this.view.setUint8(offset, value);\n }\n setUint16(offset, value) {\n this.view.setUint16(offset, value, true); // littleEndian = true\n }\n setUint32(offset, value) {\n this.view.setUint32(offset, value, true); // littleEndian = true\n }\n setUint64(offset, value) {\n this.view.setBigUint64(offset, value, true); // littleEndian = true\n }\n}\n_ReadWriteByteBuffer_instances = new WeakSet(), _ReadWriteByteBuffer_woAdd = function _ReadWriteByteBuffer_woAdd(amount) {\n if (this.woffset + amount > this._buffer.byteLength) {\n const newsize = getNextSize(this._buffer.byteLength, this.woffset + amount);\n const newBuffer = new Uint8Array(newsize);\n newBuffer.set(this._buffer);\n const oldOffset = this._buffer.byteOffset;\n this._buffer = newBuffer;\n this.view = new DataView(this._buffer.buffer, oldOffset);\n }\n this.woffset += amount;\n return this.woffset - amount;\n}, _ReadWriteByteBuffer_roAdd = function _ReadWriteByteBuffer_roAdd(amount) {\n if (this.roffset + amount > this.woffset) {\n throw new Error('Outside of the bounds of writen data.');\n }\n this.roffset += amount;\n return this.roffset - amount;\n};\n", "/**\n * @public\n */\nexport var CrdtMessageType;\n(function (CrdtMessageType) {\n CrdtMessageType[CrdtMessageType[\"RESERVED\"] = 0] = \"RESERVED\";\n // Component Operation\n CrdtMessageType[CrdtMessageType[\"PUT_COMPONENT\"] = 1] = \"PUT_COMPONENT\";\n CrdtMessageType[CrdtMessageType[\"DELETE_COMPONENT\"] = 2] = \"DELETE_COMPONENT\";\n CrdtMessageType[CrdtMessageType[\"DELETE_ENTITY\"] = 3] = \"DELETE_ENTITY\";\n CrdtMessageType[CrdtMessageType[\"APPEND_VALUE\"] = 4] = \"APPEND_VALUE\";\n // Network operations\n CrdtMessageType[CrdtMessageType[\"PUT_COMPONENT_NETWORK\"] = 5] = \"PUT_COMPONENT_NETWORK\";\n CrdtMessageType[CrdtMessageType[\"DELETE_COMPONENT_NETWORK\"] = 6] = \"DELETE_COMPONENT_NETWORK\";\n CrdtMessageType[CrdtMessageType[\"DELETE_ENTITY_NETWORK\"] = 7] = \"DELETE_ENTITY_NETWORK\";\n CrdtMessageType[CrdtMessageType[\"MAX_MESSAGE_TYPE\"] = 8] = \"MAX_MESSAGE_TYPE\";\n})(CrdtMessageType || (CrdtMessageType = {}));\n/**\n * @public\n */\nexport const CRDT_MESSAGE_HEADER_LENGTH = 8;\nexport var ProcessMessageResultType;\n(function (ProcessMessageResultType) {\n /**\n * Typical message and new state set.\n * @state CHANGE\n * @reason Incoming message has a timestamp greater\n */\n ProcessMessageResultType[ProcessMessageResultType[\"StateUpdatedTimestamp\"] = 1] = \"StateUpdatedTimestamp\";\n /**\n * Typical message when it is considered old.\n * @state it does NOT CHANGE.\n * @reason incoming message has a timestamp lower.\n */\n ProcessMessageResultType[ProcessMessageResultType[\"StateOutdatedTimestamp\"] = 2] = \"StateOutdatedTimestamp\";\n /**\n * Weird message, same timestamp and data.\n * @state it does NOT CHANGE.\n * @reason consistent state between peers.\n */\n ProcessMessageResultType[ProcessMessageResultType[\"NoChanges\"] = 3] = \"NoChanges\";\n /**\n * Less but typical message, same timestamp, resolution by data.\n * @state it does NOT CHANGE.\n * @reason incoming message has a LOWER data.\n */\n ProcessMessageResultType[ProcessMessageResultType[\"StateOutdatedData\"] = 4] = \"StateOutdatedData\";\n /**\n * Less but typical message, same timestamp, resolution by data.\n * @state CHANGE.\n * @reason incoming message has a GREATER data.\n */\n ProcessMessageResultType[ProcessMessageResultType[\"StateUpdatedData\"] = 5] = \"StateUpdatedData\";\n /**\n * Entity was previously deleted.\n * @state it does NOT CHANGE.\n * @reason The message is considered old.\n */\n ProcessMessageResultType[ProcessMessageResultType[\"EntityWasDeleted\"] = 6] = \"EntityWasDeleted\";\n /**\n * Entity should be deleted.\n * @state CHANGE.\n * @reason the state is storing old entities\n */\n ProcessMessageResultType[ProcessMessageResultType[\"EntityDeleted\"] = 7] = \"EntityDeleted\";\n})(ProcessMessageResultType || (ProcessMessageResultType = {}));\n// we receive LWW, v=6, we have v=5 => we receive with delay the deleteEntity(v=5)\n// => we should generate the deleteEntity message effects internally with deleteEntity(v=5),\n// but don't resend the deleteEntity\n// - (CRDT) addDeletedEntitySet v=5 (with crdt state cleaning) and then LWW v=6\n// - (engine) engine.deleteEntity v=5\n// we receive LWW, v=7, we have v=5 => we receive with delay the deleteEntity(v=5), deleteEntity(v=6), ..., N\n// => we should generate the deleteEntity message effects internally with deleteEntity(v=5),\n// but don't resend the deleteEntity\n// - (CRDT) addDeletedEntitySet v=5 (with crdt state cleaning) and then LWW v=6\n// - (engine) engine.deleteEntity v=5\n// msg delete entity: it only should be sent by deleter\n//\n", "import { CRDT_MESSAGE_HEADER_LENGTH } from './types';\n/**\n * @public\n */\nexport var CrdtMessageProtocol;\n(function (CrdtMessageProtocol) {\n /**\n * Validate if the message incoming is completed\n * @param buf - ByteBuffer\n */\n function validate(buf) {\n const rem = buf.remainingBytes();\n if (rem < CRDT_MESSAGE_HEADER_LENGTH) {\n return false;\n }\n const messageLength = buf.getUint32(buf.currentReadOffset());\n if (rem < messageLength) {\n return false;\n }\n return true;\n }\n CrdtMessageProtocol.validate = validate;\n /**\n * Get the current header, consuming the bytes involved.\n * @param buf - ByteBuffer\n * @returns header or null if there is no validated message\n */\n function readHeader(buf) {\n if (!validate(buf)) {\n return null;\n }\n return {\n length: buf.readUint32(),\n type: buf.readUint32()\n };\n }\n CrdtMessageProtocol.readHeader = readHeader;\n /**\n * Get the current header, without consuming the bytes involved.\n * @param buf - ByteBuffer\n * @returns header or null if there is no validated message\n */\n function getHeader(buf) {\n if (!validate(buf)) {\n return null;\n }\n const currentOffset = buf.currentReadOffset();\n return {\n length: buf.getUint32(currentOffset),\n type: buf.getUint32(currentOffset + 4)\n };\n }\n CrdtMessageProtocol.getHeader = getHeader;\n /**\n * Consume the incoming message without processing it.\n * @param buf - ByteBuffer\n * @returns true in case of success or false if there is no valid message.\n */\n function consumeMessage(buf) {\n const header = getHeader(buf);\n if (!header) {\n return false;\n }\n buf.incrementReadOffset(header.length);\n return true;\n }\n CrdtMessageProtocol.consumeMessage = consumeMessage;\n})(CrdtMessageProtocol || (CrdtMessageProtocol = {}));\n", "import { CrdtMessageProtocol } from './crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from './types';\n/**\n * @public\n */\nexport var DeleteComponent;\n(function (DeleteComponent) {\n DeleteComponent.MESSAGE_HEADER_LENGTH = 12;\n /**\n * Write DeleteComponent message\n */\n function write(entity, componentId, timestamp, buf) {\n // reserve the beginning\n const messageLength = CRDT_MESSAGE_HEADER_LENGTH + DeleteComponent.MESSAGE_HEADER_LENGTH;\n const startMessageOffset = buf.incrementWriteOffset(messageLength);\n // Write CrdtMessage header\n buf.setUint32(startMessageOffset, messageLength);\n buf.setUint32(startMessageOffset + 4, CrdtMessageType.DELETE_COMPONENT);\n // Write ComponentOperation header\n buf.setUint32(startMessageOffset + 8, entity);\n buf.setUint32(startMessageOffset + 12, componentId);\n buf.setUint32(startMessageOffset + 16, timestamp);\n }\n DeleteComponent.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.DELETE_COMPONENT) {\n throw new Error('DeleteComponentOperation tried to read another message type.');\n }\n const msg = {\n ...header,\n entityId: buf.readUint32(),\n componentId: buf.readUint32(),\n timestamp: buf.readUint32()\n };\n return msg;\n }\n DeleteComponent.read = read;\n})(DeleteComponent || (DeleteComponent = {}));\n", "import { CrdtMessageProtocol } from './crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from './types';\n/**\n * @public\n */\nexport var AppendValueOperation;\n(function (AppendValueOperation) {\n AppendValueOperation.MESSAGE_HEADER_LENGTH = 16;\n /**\n * Call this function for an optimal writing data passing the ByteBuffer\n * already allocated\n */\n function write(entity, timestamp, componentId, data, buf) {\n // reserve the beginning\n const startMessageOffset = buf.incrementWriteOffset(CRDT_MESSAGE_HEADER_LENGTH + AppendValueOperation.MESSAGE_HEADER_LENGTH);\n // write body\n buf.writeBuffer(data, false);\n const messageLength = buf.currentWriteOffset() - startMessageOffset;\n // Write CrdtMessage header\n buf.setUint32(startMessageOffset, messageLength);\n buf.setUint32(startMessageOffset + 4, CrdtMessageType.APPEND_VALUE);\n // Write ComponentOperation header\n buf.setUint32(startMessageOffset + 8, entity);\n buf.setUint32(startMessageOffset + 12, componentId);\n buf.setUint32(startMessageOffset + 16, timestamp);\n const newLocal = messageLength - AppendValueOperation.MESSAGE_HEADER_LENGTH - CRDT_MESSAGE_HEADER_LENGTH;\n buf.setUint32(startMessageOffset + 20, newLocal);\n }\n AppendValueOperation.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n /* istanbul ignore if */\n if (!header) {\n return null;\n }\n /* istanbul ignore if */\n if (header.type !== CrdtMessageType.APPEND_VALUE) {\n throw new Error('AppendValueOperation tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32(),\n componentId: buf.readUint32(),\n timestamp: buf.readUint32(),\n data: buf.readBuffer()\n };\n }\n AppendValueOperation.read = read;\n})(AppendValueOperation || (AppendValueOperation = {}));\n", "import { CrdtMessageProtocol } from './crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from './types';\n/**\n * @public\n */\nexport var DeleteEntity;\n(function (DeleteEntity) {\n DeleteEntity.MESSAGE_HEADER_LENGTH = 4;\n function write(entity, buf) {\n // Write CrdtMessage header\n buf.writeUint32(CRDT_MESSAGE_HEADER_LENGTH + 4);\n buf.writeUint32(CrdtMessageType.DELETE_ENTITY);\n // body\n buf.writeUint32(entity);\n }\n DeleteEntity.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.DELETE_ENTITY) {\n throw new Error('DeleteEntity tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32()\n };\n }\n DeleteEntity.read = read;\n})(DeleteEntity || (DeleteEntity = {}));\n", "import { CrdtMessageProtocol } from './crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from './types';\n/**\n * @public\n */\nexport var PutComponentOperation;\n(function (PutComponentOperation) {\n PutComponentOperation.MESSAGE_HEADER_LENGTH = 16;\n /**\n * Call this function for an optimal writing data passing the ByteBuffer\n * already allocated\n */\n function write(entity, timestamp, componentId, data, buf) {\n // reserve the beginning\n const startMessageOffset = buf.incrementWriteOffset(CRDT_MESSAGE_HEADER_LENGTH + PutComponentOperation.MESSAGE_HEADER_LENGTH);\n // write body\n buf.writeBuffer(data, false);\n const messageLength = buf.currentWriteOffset() - startMessageOffset;\n // Write CrdtMessage header\n buf.setUint32(startMessageOffset, messageLength);\n buf.setUint32(startMessageOffset + 4, CrdtMessageType.PUT_COMPONENT);\n // Write ComponentOperation header\n buf.setUint32(startMessageOffset + 8, entity);\n buf.setUint32(startMessageOffset + 12, componentId);\n buf.setUint32(startMessageOffset + 16, timestamp);\n const newLocal = messageLength - PutComponentOperation.MESSAGE_HEADER_LENGTH - CRDT_MESSAGE_HEADER_LENGTH;\n buf.setUint32(startMessageOffset + 20, newLocal);\n }\n PutComponentOperation.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.PUT_COMPONENT) {\n throw new Error('PutComponentOperation tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32(),\n componentId: buf.readUint32(),\n timestamp: buf.readUint32(),\n data: buf.readBuffer()\n };\n }\n PutComponentOperation.read = read;\n})(PutComponentOperation || (PutComponentOperation = {}));\n", "import { CrdtMessageProtocol } from '../crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from '../types';\n/**\n * @public\n */\nexport var PutNetworkComponentOperation;\n(function (PutNetworkComponentOperation) {\n PutNetworkComponentOperation.MESSAGE_HEADER_LENGTH = 20;\n /**\n * Call this function for an optimal writing data passing the ByteBuffer\n * already allocated\n */\n function write(entity, timestamp, componentId, networkId, data, buf) {\n // reserve the beginning\n const startMessageOffset = buf.incrementWriteOffset(CRDT_MESSAGE_HEADER_LENGTH + PutNetworkComponentOperation.MESSAGE_HEADER_LENGTH);\n // write body\n buf.writeBuffer(data, false);\n const messageLength = buf.currentWriteOffset() - startMessageOffset;\n // Write CrdtMessage header\n buf.setUint32(startMessageOffset, messageLength);\n buf.setUint32(startMessageOffset + 4, CrdtMessageType.PUT_COMPONENT_NETWORK);\n // Write ComponentOperation header\n buf.setUint32(startMessageOffset + 8, entity);\n buf.setUint32(startMessageOffset + 12, componentId);\n buf.setUint32(startMessageOffset + 16, timestamp);\n buf.setUint32(startMessageOffset + 20, networkId);\n const dataLength = messageLength - PutNetworkComponentOperation.MESSAGE_HEADER_LENGTH - CRDT_MESSAGE_HEADER_LENGTH;\n buf.setUint32(startMessageOffset + 24, dataLength);\n }\n PutNetworkComponentOperation.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.PUT_COMPONENT_NETWORK) {\n throw new Error('PutComponentNetworkOperation tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32(),\n componentId: buf.readUint32(),\n timestamp: buf.readUint32(),\n networkId: buf.readUint32(),\n data: buf.readBuffer()\n };\n }\n PutNetworkComponentOperation.read = read;\n})(PutNetworkComponentOperation || (PutNetworkComponentOperation = {}));\n", "import { CrdtMessageProtocol } from '../crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from '../types';\n/**\n * @public\n */\nexport var DeleteComponentNetwork;\n(function (DeleteComponentNetwork) {\n DeleteComponentNetwork.MESSAGE_HEADER_LENGTH = 16;\n /**\n * Write DeleteComponent message\n */\n function write(entity, componentId, timestamp, networkId, buf) {\n // reserve the beginning\n const messageLength = CRDT_MESSAGE_HEADER_LENGTH + DeleteComponentNetwork.MESSAGE_HEADER_LENGTH;\n const startMessageOffset = buf.incrementWriteOffset(messageLength);\n // Write CrdtMessage header\n buf.setUint32(startMessageOffset, messageLength);\n buf.setUint32(startMessageOffset + 4, CrdtMessageType.DELETE_COMPONENT_NETWORK);\n // Write ComponentOperation header\n buf.setUint32(startMessageOffset + 8, entity);\n buf.setUint32(startMessageOffset + 12, componentId);\n buf.setUint32(startMessageOffset + 16, timestamp);\n buf.setUint32(startMessageOffset + 20, networkId);\n }\n DeleteComponentNetwork.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.DELETE_COMPONENT_NETWORK) {\n throw new Error('DeleteComponentOperation tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32(),\n componentId: buf.readUint32(),\n timestamp: buf.readUint32(),\n networkId: buf.readUint32()\n };\n }\n DeleteComponentNetwork.read = read;\n})(DeleteComponentNetwork || (DeleteComponentNetwork = {}));\n", "import { CrdtMessageProtocol } from '../crdtMessageProtocol';\nimport { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from '../types';\n/**\n * @public\n */\nexport var DeleteEntityNetwork;\n(function (DeleteEntityNetwork) {\n DeleteEntityNetwork.MESSAGE_HEADER_LENGTH = 8;\n function write(entity, networkId, buf) {\n // Write CrdtMessage header\n buf.writeUint32(CRDT_MESSAGE_HEADER_LENGTH + 4);\n buf.writeUint32(CrdtMessageType.DELETE_ENTITY_NETWORK);\n // body\n buf.writeUint32(entity);\n buf.writeUint32(networkId);\n }\n DeleteEntityNetwork.write = write;\n function read(buf) {\n const header = CrdtMessageProtocol.readHeader(buf);\n if (!header) {\n return null;\n }\n if (header.type !== CrdtMessageType.DELETE_ENTITY_NETWORK) {\n throw new Error('DeleteEntityNetwork tried to read another message type.');\n }\n return {\n ...header,\n entityId: buf.readUint32(),\n networkId: buf.readUint32()\n };\n }\n DeleteEntityNetwork.read = read;\n})(DeleteEntityNetwork || (DeleteEntityNetwork = {}));\n", "import { ReadWriteByteBuffer } from '../../ByteBuffer';\nimport { PutComponentOperation } from '../putComponent';\nimport { CrdtMessageType } from '../types';\nimport { DeleteComponent } from '../deleteComponent';\nimport { DeleteEntity } from '../deleteEntity';\nimport { PutNetworkComponentOperation } from './putComponentNetwork';\nimport { DeleteComponentNetwork } from './deleteComponentNetwork';\nimport { DeleteEntityNetwork } from './deleteEntityNetwork';\nimport { TransformSchema } from '../../../components/manual/Transform';\n/* istanbul ignore next */\nexport function isNetworkMessage(message) {\n return [\n CrdtMessageType.DELETE_COMPONENT_NETWORK,\n CrdtMessageType.DELETE_ENTITY_NETWORK,\n CrdtMessageType.PUT_COMPONENT_NETWORK\n ].includes(message.type);\n}\n/* istanbul ignore next */\nexport function networkMessageToLocal(message, localEntityId, buffer, destinationBuffer) {\n const offset = buffer.currentWriteOffset();\n if (message.type === CrdtMessageType.PUT_COMPONENT_NETWORK) {\n PutComponentOperation.write(localEntityId, message.timestamp, message.componentId, message.data, buffer);\n }\n else if (message.type === CrdtMessageType.DELETE_COMPONENT_NETWORK) {\n DeleteComponent.write(localEntityId, message.componentId, message.timestamp, buffer);\n }\n else if (message.type === CrdtMessageType.DELETE_ENTITY_NETWORK) {\n DeleteEntity.write(localEntityId, buffer);\n }\n destinationBuffer.writeBuffer(buffer.buffer().subarray(offset, buffer.currentWriteOffset()), false);\n}\n/* istanbul ignore next */\nexport function localMessageToNetwork(message, network, buffer, destinationBuffer) {\n const offset = buffer.currentWriteOffset();\n if (message.type === CrdtMessageType.PUT_COMPONENT) {\n PutNetworkComponentOperation.write(network.entityId, message.timestamp, message.componentId, network.networkId, message.data, buffer);\n }\n else if (message.type === CrdtMessageType.DELETE_COMPONENT) {\n DeleteComponentNetwork.write(network.entityId, message.componentId, message.timestamp, network.networkId, buffer);\n }\n else if (message.type === CrdtMessageType.DELETE_ENTITY) {\n DeleteEntityNetwork.write(network.entityId, network.networkId, buffer);\n }\n destinationBuffer.writeBuffer(buffer.buffer().subarray(offset, buffer.currentWriteOffset()), false);\n}\n/* istanbul ignore next */\nexport function fixTransformParent(message, transformValue, parent) {\n let transform = transformValue;\n const buffer = new ReadWriteByteBuffer();\n if (!transform && 'data' in message) {\n buffer.writeBuffer(message.data);\n transform = TransformSchema.deserialize(buffer);\n buffer.resetBuffer();\n }\n if (!transform)\n throw new Error('Invalid parent transform');\n // Generate new transform raw data with the parent\n const newTransform = { ...transform, parent };\n buffer.resetBuffer();\n TransformSchema.serialize(newTransform, buffer);\n return buffer.toBinary();\n}\n", "import { EntityState } from '../../engine/entity';\nimport { ReadWriteByteBuffer } from '../../serialization/ByteBuffer';\nimport { AppendValueOperation, CrdtMessageProtocol, DeleteComponentNetwork, DeleteEntityNetwork } from '../../serialization/crdt';\nimport { DeleteComponent } from '../../serialization/crdt/deleteComponent';\nimport { DeleteEntity } from '../../serialization/crdt/deleteEntity';\nimport { PutComponentOperation } from '../../serialization/crdt/putComponent';\nimport { CrdtMessageType } from '../../serialization/crdt/types';\nimport { PutNetworkComponentOperation } from '../../serialization/crdt/network/putComponentNetwork';\nimport { NetworkEntity as defineNetworkEntity, NetworkParent as defineNetworkParent, Transform as defineTransform } from '../../components';\nimport * as networkUtils from '../../serialization/crdt/network/utils';\n/**\n * @internal\n */\nexport function crdtSceneSystem(engine, onProcessEntityComponentChange) {\n const transports = [];\n // Components that we used on this system\n const NetworkEntity = defineNetworkEntity(engine);\n const NetworkParent = defineNetworkParent(engine);\n const Transform = defineTransform(engine);\n // Messages that we received at transport.onMessage waiting to be processed\n const receivedMessages = [];\n // Messages already processed by the engine but that we need to broadcast to other transports.\n const broadcastMessages = [];\n /**\n *\n * @param transportId tranport id to identiy messages\n * @returns a function to process received messages\n */\n function parseChunkMessage(transportId) {\n /**\n * Receives a chunk of binary messages and stores all the valid\n * Component Operation Messages at messages queue\n * @param chunkMessage A chunk of binary messages\n */\n return function parseChunkMessage(chunkMessage) {\n const buffer = new ReadWriteByteBuffer(chunkMessage);\n let header;\n while ((header = CrdtMessageProtocol.getHeader(buffer))) {\n const offset = buffer.currentReadOffset();\n let message = undefined;\n if (header.type === CrdtMessageType.DELETE_COMPONENT) {\n message = DeleteComponent.read(buffer);\n }\n else if (header.type === CrdtMessageType.DELETE_COMPONENT_NETWORK) {\n message = DeleteComponentNetwork.read(buffer);\n }\n else if (header.type === CrdtMessageType.PUT_COMPONENT) {\n message = PutComponentOperation.read(buffer);\n }\n else if (header.type === CrdtMessageType.PUT_COMPONENT_NETWORK) {\n message = PutNetworkComponentOperation.read(buffer);\n }\n else if (header.type === CrdtMessageType.DELETE_ENTITY) {\n message = DeleteEntity.read(buffer);\n }\n else if (header.type === CrdtMessageType.DELETE_ENTITY_NETWORK) {\n message = DeleteEntityNetwork.read(buffer);\n }\n else if (header.type === CrdtMessageType.APPEND_VALUE) {\n message = AppendValueOperation.read(buffer);\n // Unknown message, we skip it\n }\n else {\n // consume the message\n buffer.incrementReadOffset(header.length);\n }\n if (message) {\n receivedMessages.push({\n ...message,\n transportId,\n messageBuffer: buffer.buffer().subarray(offset, buffer.currentReadOffset())\n });\n }\n }\n };\n }\n /**\n * Return and clear the messaes queue\n * @returns messages recieved by the transport to process on the next tick\n */\n function getMessages(value) {\n const messagesToProcess = value.splice(0, value.length);\n return messagesToProcess;\n }\n /**\n * Find the local entityId associated to the network component message.\n * It's a mapping Network -> to Local\n * If it's not a network message, return the entityId received by the message\n */\n function findNetworkId(msg) {\n const hasNetworkId = 'networkId' in msg;\n if (hasNetworkId) {\n for (const [entityId, network] of engine.getEntitiesWith(NetworkEntity)) {\n if (network.networkId === msg.networkId && network.entityId === msg.entityId) {\n return { entityId, network };\n }\n }\n }\n return { entityId: msg.entityId };\n }\n /**\n * This fn will be called on every tick.\n * Process all the messages queue received by the transport\n */\n async function receiveMessages() {\n const messagesToProcess = getMessages(receivedMessages);\n const entitiesShouldBeCleaned = [];\n for (const msg of messagesToProcess) {\n let { entityId, network } = findNetworkId(msg);\n // We receive a new Entity. Create the localEntity and map it to the NetworkEntity component\n if (networkUtils.isNetworkMessage(msg) && !network) {\n entityId = engine.addEntity();\n network = { entityId: msg.entityId, networkId: msg.networkId };\n NetworkEntity.createOrReplace(entityId, network);\n }\n if (msg.type === CrdtMessageType.DELETE_ENTITY || msg.type === CrdtMessageType.DELETE_ENTITY_NETWORK) {\n entitiesShouldBeCleaned.push(entityId);\n broadcastMessages.push(msg);\n }\n else {\n const entityState = engine.entityContainer.getEntityState(entityId);\n // Skip updates from removed entityes\n if (entityState === EntityState.Removed)\n continue;\n // Entities with unknown entities should update its entity state\n if (entityState === EntityState.Unknown) {\n engine.entityContainer.updateUsedEntity(entityId);\n }\n const component = engine.getComponentOrNull(msg.componentId);\n /* istanbul ignore else */\n if (component) {\n if (msg.type === CrdtMessageType.PUT_COMPONENT &&\n component.componentId === Transform.componentId &&\n NetworkEntity.has(entityId) &&\n NetworkParent.has(entityId)) {\n msg.data = networkUtils.fixTransformParent(msg);\n }\n const [conflictMessage, value] = component.updateFromCrdt({ ...msg, entityId });\n if (!conflictMessage) {\n // Add message to transport queue to be processed by others transports\n broadcastMessages.push(msg);\n onProcessEntityComponentChange && onProcessEntityComponentChange(msg.entityId, msg.type, component, value);\n }\n }\n else {\n // TODO: test this line, it is fundammental to make the editor work\n broadcastMessages.push(msg);\n }\n }\n }\n // the last stage of the syncrhonization is to delete the entities\n for (const entity of entitiesShouldBeCleaned) {\n for (const definition of engine.componentsIter()) {\n // TODO: check this with pato/pravus\n definition.entityDeleted(entity, true);\n }\n engine.entityContainer.updateRemovedEntity(entity);\n onProcessEntityComponentChange && onProcessEntityComponentChange(entity, CrdtMessageType.DELETE_ENTITY);\n }\n }\n /**\n * Iterates the dirty map and generates crdt messages to be send\n */\n async function sendMessages(entitiesDeletedThisTick) {\n // CRDT Messages will be the merge between the recieved transport messages and the new crdt messages\n const crdtMessages = getMessages(broadcastMessages);\n const buffer = new ReadWriteByteBuffer();\n for (const component of engine.componentsIter()) {\n for (const message of component.getCrdtUpdates()) {\n const offset = buffer.currentWriteOffset();\n // Avoid creating messages if there is no transport that will handle it\n if (transports.some((t) => t.filter(message))) {\n if (message.type === CrdtMessageType.PUT_COMPONENT) {\n PutComponentOperation.write(message.entityId, message.timestamp, message.componentId, message.data, buffer);\n }\n else if (message.type === CrdtMessageType.DELETE_COMPONENT) {\n DeleteComponent.write(message.entityId, component.componentId, message.timestamp, buffer);\n }\n else if (message.type === CrdtMessageType.APPEND_VALUE) {\n AppendValueOperation.write(message.entityId, message.timestamp, message.componentId, message.data, buffer);\n }\n crdtMessages.push({\n ...message,\n messageBuffer: buffer.buffer().subarray(offset, buffer.currentWriteOffset())\n });\n if (onProcessEntityComponentChange) {\n const rawValue = message.type === CrdtMessageType.PUT_COMPONENT || message.type === CrdtMessageType.APPEND_VALUE\n ? component.get(message.entityId)\n : undefined;\n onProcessEntityComponentChange(message.entityId, message.type, component, rawValue);\n }\n }\n }\n }\n // After all updates, I execute the DeletedEntity messages\n for (const entityId of entitiesDeletedThisTick) {\n const offset = buffer.currentWriteOffset();\n DeleteEntity.write(entityId, buffer);\n crdtMessages.push({\n type: CrdtMessageType.DELETE_ENTITY,\n entityId,\n messageBuffer: buffer.buffer().subarray(offset, buffer.currentWriteOffset())\n });\n onProcessEntityComponentChange && onProcessEntityComponentChange(entityId, CrdtMessageType.DELETE_ENTITY);\n }\n // Send CRDT messages to transports\n const transportBuffer = new ReadWriteByteBuffer();\n for (const index in transports) {\n const transportIndex = Number(index);\n const transport = transports[transportIndex];\n const isRendererTransport = transport.type === 'renderer';\n const isNetworkTransport = transport.type === 'network';\n transportBuffer.resetBuffer();\n const buffer = new ReadWriteByteBuffer();\n // Then we send all the new crdtMessages that the transport needs to process\n for (const message of crdtMessages) {\n // Avoid echo messages\n if (message.transportId === transportIndex)\n continue;\n // Redundant message for the transport\n if (!transport.filter(message))\n continue;\n const { entityId } = findNetworkId(message);\n const transformNeedsFix = 'componentId' in message &&\n message.componentId === Transform.componentId &&\n Transform.has(entityId) &&\n NetworkParent.has(entityId) &&\n NetworkEntity.has(entityId);\n // If there was a LOCAL change in the transform. Add the parent to that transform\n if (isRendererTransport && message.type === CrdtMessageType.PUT_COMPONENT && transformNeedsFix) {\n const parent = findNetworkId(NetworkParent.get(entityId));\n const transformData = networkUtils.fixTransformParent(message, Transform.get(entityId), parent.entityId);\n const offset = buffer.currentWriteOffset();\n PutComponentOperation.write(entityId, message.timestamp, message.componentId, transformData, buffer);\n transportBuffer.writeBuffer(buffer.buffer().subarray(offset, buffer.currentWriteOffset()), false);\n continue;\n }\n if (isRendererTransport && networkUtils.isNetworkMessage(message)) {\n // If it's the renderer transport and its a NetworkMessage, we need to fix the entityId field and convert it to a known Message.\n // PUT_NETWORK_COMPONENT -> PUT_COMPONENT\n let transformData = 'data' in message ? message.data : new Uint8Array();\n if (transformNeedsFix) {\n const parent = findNetworkId(NetworkParent.get(entityId));\n transformData = networkUtils.fixTransformParent(message, Transform.get(entityId), parent.entityId);\n }\n networkUtils.networkMessageToLocal({ ...message, data: transformData }, entityId, buffer, transportBuffer);\n // Iterate the next message\n continue;\n }\n // If its a network transport and its a PUT_COMPONENT that has a NetworkEntity component, we need to send this message\n // through comms with the EntityID and NetworkID from ther NetworkEntity so everyone can recieve this message and map to their custom entityID.\n if (isNetworkTransport && !networkUtils.isNetworkMessage(message)) {\n const networkData = NetworkEntity.getOrNull(message.entityId);\n // If it has networkData convert the message to PUT_NETWORK_COMPONENT.\n if (networkData) {\n networkUtils.localMessageToNetwork(message, networkData, buffer, transportBuffer);\n // Iterate the next message\n continue;\n }\n }\n // Common message\n transportBuffer.writeBuffer(message.messageBuffer, false);\n }\n const message = transportBuffer.currentWriteOffset() ? transportBuffer.toBinary() : new Uint8Array([]);\n await transport.send(message);\n }\n }\n /**\n * @public\n * Add a transport to the crdt system\n */\n function addTransport(transport) {\n const id = transports.push(transport) - 1;\n transport.onmessage = parseChunkMessage(id);\n }\n return {\n sendMessages,\n receiveMessages,\n addTransport\n };\n}\n", "export var CrdtUtils;\n(function (CrdtUtils) {\n let SynchronizedEntityType;\n (function (SynchronizedEntityType) {\n // synchronizes entities with the NetworkSynchronized component only, used for networked games\n SynchronizedEntityType[SynchronizedEntityType[\"NETWORKED\"] = 0] = \"NETWORKED\";\n // synchronizes entities needed by the renderer\n SynchronizedEntityType[SynchronizedEntityType[\"RENDERER\"] = 1] = \"RENDERER\";\n })(SynchronizedEntityType = CrdtUtils.SynchronizedEntityType || (CrdtUtils.SynchronizedEntityType = {}));\n})(CrdtUtils || (CrdtUtils = {}));\nexport default CrdtUtils;\n/**\n * Compare raw data.\n * @public\n * @returns 0 if is the same data, 1 if a > b, -1 if b > a\n */\nexport function dataCompare(a, b) {\n // At reference level\n if (a === b)\n return 0;\n if (a === null && b !== null)\n return -1;\n if (a !== null && b === null)\n return 1;\n if (a instanceof Uint8Array && b instanceof Uint8Array) {\n const lengthDifference = a.byteLength - b.byteLength;\n if (lengthDifference !== 0) {\n return lengthDifference > 0 ? 1 : -1;\n }\n let res;\n for (let i = 0, n = a.byteLength; i < n; i++) {\n res = a[i] - b[i];\n if (res !== 0) {\n return res > 0 ? 1 : -1;\n }\n }\n // the data is exactly the same\n return 0;\n }\n if (typeof a === 'string') {\n const lengthDifference = a.length - b.length;\n if (lengthDifference !== 0) {\n return lengthDifference > 0 ? 1 : -1;\n }\n return a.localeCompare(b);\n }\n return a > b ? 1 : -1;\n}\n", "/**\n * @internal\n */\nexport function deepReadonly(val) {\n return Object.freeze({ ...val });\n}\n", "import { ReadWriteByteBuffer } from '../serialization/ByteBuffer';\nimport { ProcessMessageResultType, CrdtMessageType, PutComponentOperation, DeleteComponent } from '../serialization/crdt';\nimport { dataCompare } from '../systems/crdt/utils';\nimport { deepReadonly } from './readonly';\nexport function incrementTimestamp(entity, timestamps) {\n const newTimestamp = (timestamps.get(entity) || 0) + 1;\n timestamps.set(entity, newTimestamp);\n return newTimestamp;\n}\nexport function createDumpLwwFunctionFromCrdt(componentId, timestamps, schema, data) {\n return function dumpCrdtState(buffer, filterEntity) {\n for (const [entity, timestamp] of timestamps) {\n /* istanbul ignore if */\n if (filterEntity) {\n // I swear that this is being tested on state-to-crdt.spec but jest is trolling me\n /* istanbul ignore next */\n if (!filterEntity(entity))\n continue;\n }\n /* istanbul ignore else */\n if (data.has(entity)) {\n const it = data.get(entity);\n const buf = new ReadWriteByteBuffer();\n schema.serialize(it, buf);\n PutComponentOperation.write(entity, timestamp, componentId, buf.toBinary(), buffer);\n }\n else {\n DeleteComponent.write(entity, componentId, timestamp, buffer);\n }\n }\n };\n}\nexport function createUpdateLwwFromCrdt(componentId, timestamps, schema, data) {\n /**\n * Process the received message only if the lamport number recieved is higher\n * than the stored one. If its lower, we spread it to the network to correct the peer.\n * If they are equal, the bigger raw data wins.\n \n * Returns the recieved data if the lamport number was bigger than ours.\n * If it was an outdated message, then we return void\n * @public\n */\n function crdtRuleForCurrentState(message) {\n const { entityId, timestamp } = message;\n const currentTimestamp = timestamps.get(entityId);\n // The received message is > than our current value, update our state.components.\n if (currentTimestamp === undefined || currentTimestamp < timestamp) {\n return ProcessMessageResultType.StateUpdatedTimestamp;\n }\n // Outdated Message. Resend our state message through the wire.\n if (currentTimestamp > timestamp) {\n // console.log('2', currentTimestamp, timestamp)\n return ProcessMessageResultType.StateOutdatedTimestamp;\n }\n // Deletes are idempotent\n if (message.type === CrdtMessageType.DELETE_COMPONENT && !data.has(entityId)) {\n return ProcessMessageResultType.NoChanges;\n }\n let currentDataGreater = 0;\n if (data.has(entityId)) {\n const writeBuffer = new ReadWriteByteBuffer();\n schema.serialize(data.get(entityId), writeBuffer);\n currentDataGreater = dataCompare(writeBuffer.toBinary(), message.data || null);\n }\n else {\n currentDataGreater = dataCompare(null, message.data);\n }\n // Same data, same timestamp. Weirdo echo message.\n // console.log('3', currentDataGreater, writeBuffer.toBinary(), (message as any).data || null)\n if (currentDataGreater === 0) {\n return ProcessMessageResultType.NoChanges;\n }\n else if (currentDataGreater > 0) {\n // Current data is greater\n return ProcessMessageResultType.StateOutdatedData;\n }\n else {\n // Curent data is lower\n return ProcessMessageResultType.StateUpdatedData;\n }\n }\n return (msg) => {\n /* istanbul ignore next */\n if (msg.type !== CrdtMessageType.PUT_COMPONENT &&\n msg.type !== CrdtMessageType.PUT_COMPONENT_NETWORK &&\n msg.type !== CrdtMessageType.DELETE_COMPONENT &&\n msg.type !== CrdtMessageType.DELETE_COMPONENT_NETWORK)\n /* istanbul ignore next */\n return [null, data.get(msg.entityId)];\n const action = crdtRuleForCurrentState(msg);\n const entity = msg.entityId;\n switch (action) {\n case ProcessMessageResultType.StateUpdatedData:\n case ProcessMessageResultType.StateUpdatedTimestamp: {\n timestamps.set(entity, msg.timestamp);\n if (msg.type === CrdtMessageType.PUT_COMPONENT || msg.type === CrdtMessageType.PUT_COMPONENT_NETWORK) {\n const buf = new ReadWriteByteBuffer(msg.data);\n data.set(entity, schema.deserialize(buf));\n }\n else {\n data.delete(entity);\n }\n return [null, data.get(entity)];\n }\n case ProcessMessageResultType.StateOutdatedTimestamp:\n case ProcessMessageResultType.StateOutdatedData: {\n if (data.has(entity)) {\n const writeBuffer = new ReadWriteByteBuffer();\n schema.serialize(data.get(entity), writeBuffer);\n return [\n {\n type: CrdtMessageType.PUT_COMPONENT,\n componentId,\n data: writeBuffer.toBinary(),\n entityId: entity,\n timestamp: timestamps.get(entity)\n },\n data.get(entity)\n ];\n }\n else {\n return [\n {\n type: CrdtMessageType.DELETE_COMPONENT,\n componentId,\n entityId: entity,\n timestamp: timestamps.get(entity)\n },\n undefined\n ];\n }\n }\n }\n return [null, data.get(entity)];\n };\n}\nexport function createGetCrdtMessagesForLww(componentId, timestamps, dirtyIterator, schema, data) {\n return function* () {\n for (const entity of dirtyIterator) {\n const newTimestamp = incrementTimestamp(entity, timestamps);\n if (data.has(entity)) {\n const writeBuffer = new ReadWriteByteBuffer();\n schema.serialize(data.get(entity), writeBuffer);\n const msg = {\n type: CrdtMessageType.PUT_COMPONENT,\n componentId,\n entityId: entity,\n data: writeBuffer.toBinary(),\n timestamp: newTimestamp\n };\n yield msg;\n }\n else {\n const msg = {\n type: CrdtMessageType.DELETE_COMPONENT,\n componentId,\n entityId: entity,\n timestamp: newTimestamp\n };\n yield msg;\n }\n }\n dirtyIterator.clear();\n };\n}\n/**\n * @internal\n */\nexport function createComponentDefinitionFromSchema(componentName, componentId, schema) {\n const data = new Map();\n const dirtyIterator = new Set();\n const timestamps = new Map();\n return {\n get componentId() {\n return componentId;\n },\n get componentName() {\n return componentName;\n },\n get componentType() {\n // a getter is used here to prevent accidental changes\n return 0 /* ComponentType.LastWriteWinElementSet */;\n },\n schema,\n has(entity) {\n return data.has(entity);\n },\n deleteFrom(entity, markAsDirty = true) {\n const component = data.get(entity);\n if (data.delete(entity) && markAsDirty) {\n dirtyIterator.add(entity);\n }\n return component || null;\n },\n entityDeleted(entity, markAsDirty) {\n if (data.delete(entity) && markAsDirty) {\n dirtyIterator.add(entity);\n }\n },\n getOrNull(entity) {\n const component = data.get(entity);\n return component ? deepReadonly(component) : null;\n },\n get(entity) {\n const component = data.get(entity);\n if (!component) {\n throw new Error(`[getFrom] Component ${componentName} for entity #${entity} not found`);\n }\n return deepReadonly(component);\n },\n create(entity, value) {\n const component = data.get(entity);\n if (component) {\n throw new Error(`[create] Component ${componentName} for ${entity} already exists`);\n }\n const usedValue = value === undefined ? schema.create() : schema.extend ? schema.extend(value) : value;\n data.set(entity, usedValue);\n dirtyIterator.add(entity);\n return usedValue;\n },\n createOrReplace(entity, value) {\n const usedValue = value === undefined ? schema.create() : schema.extend ? schema.extend(value) : value;\n data.set(entity, usedValue);\n dirtyIterator.add(entity);\n return usedValue;\n },\n getMutableOrNull(entity) {\n const component = data.get(entity);\n if (!component) {\n return null;\n }\n dirtyIterator.add(entity);\n return component;\n },\n getOrCreateMutable(entity, value) {\n const component = data.get(entity);\n if (!component) {\n return this.create(entity, value);\n }\n else {\n dirtyIterator.add(entity);\n return component;\n }\n },\n getMutable(entity) {\n const component = this.getMutableOrNull(entity);\n if (component === null) {\n throw new Error(`[mutable] Component ${componentName} for ${entity} not found`);\n }\n return component;\n },\n *iterator() {\n for (const [entity, component] of data) {\n yield [entity, component];\n }\n },\n *dirtyIterator() {\n for (const entity of dirtyIterator) {\n yield entity;\n }\n },\n getCrdtUpdates: createGetCrdtMessagesForLww(componentId, timestamps, dirtyIterator, schema, data),\n updateFromCrdt: createUpdateLwwFromCrdt(componentId, timestamps, schema, data),\n dumpCrdtStateToBuffer: createDumpLwwFunctionFromCrdt(componentId, timestamps, schema, data)\n };\n}\n", "export const SYSTEMS_REGULAR_PRIORITY = 100e3;\nexport function SystemContainer() {\n const systems = [];\n function sort() {\n // TODO: systems with the same priority should always have the same stable order\n // add a \"counter\" to the System type to ensure that order\n systems.sort((a, b) => b.priority - a.priority);\n }\n function add(fn, priority, name) {\n const systemName = name ?? fn.name;\n if (systems.find((item) => item.fn === fn)) {\n throw new Error(`System ${JSON.stringify(systemName)} already added to the engine`);\n }\n systems.push({\n fn,\n priority,\n name: systemName\n });\n // TODO: replace this sort by an insertion in the right place\n sort();\n }\n function remove(selector) {\n let index = -1;\n if (typeof selector === 'string') {\n index = systems.findIndex((item) => item.name === selector);\n }\n else {\n index = systems.findIndex((item) => item.fn === selector);\n }\n if (index === -1) {\n return false;\n }\n systems.splice(index, 1);\n sort();\n return true;\n }\n return {\n add,\n remove,\n getSystems() {\n return systems;\n }\n };\n}\n", "import { ReadWriteByteBuffer } from '../serialization/ByteBuffer';\nimport { AppendValueOperation, CrdtMessageType } from '../serialization/crdt';\nimport { __DEV__ } from '../runtime/invariant';\nconst emptyReadonlySet = freezeSet(new Set());\nfunction frozenError() {\n throw new Error('The set is frozen');\n}\nfunction freezeSet(set) {\n ;\n set.add = frozenError;\n set.clear = frozenError;\n return set;\n}\nfunction sortByTimestamp(a, b) {\n return a.timestamp > b.timestamp ? 1 : -1;\n}\n/**\n * @internal\n */\nexport function createValueSetComponentDefinitionFromSchema(componentName, componentId, schema, options) {\n const data = new Map();\n const dirtyIterator = new Set();\n const queuedCommands = [];\n // only sort the array if the latest (N) element has a timestamp <= N-1\n function shouldSort(row) {\n const len = row.raw.length;\n if (len > 1 && row.raw[len - 1].timestamp <= row.raw[len - 2].timestamp) {\n return true;\n }\n return false;\n }\n function gotUpdated(entity) {\n const row = data.get(entity);\n /* istanbul ignore else */\n if (row) {\n if (shouldSort(row)) {\n row.raw.sort(sortByTimestamp);\n }\n while (row.raw.length > options.maxElements) {\n row.raw.shift();\n }\n const frozenSet = freezeSet(new Set(row?.raw.map(($) => $.value)));\n row.frozenSet = frozenSet;\n return frozenSet;\n }\n else {\n /* istanbul ignore next */\n return emptyReadonlySet;\n }\n }\n function append(entity, value) {\n let row = data.get(entity);\n if (!row) {\n row = { raw: [], frozenSet: emptyReadonlySet };\n data.set(entity, row);\n }\n const usedValue = schema.extend ? schema.extend(value) : value;\n const timestamp = options.timestampFunction(usedValue);\n if (__DEV__) {\n // only freeze the objects in dev mode to warn the developers because\n // it is an expensive operation\n Object.freeze(usedValue);\n }\n row.raw.push({ value: usedValue, timestamp });\n return { set: gotUpdated(entity), value: usedValue };\n }\n const ret = {\n get componentId() {\n return componentId;\n },\n get componentName() {\n return componentName;\n },\n get componentType() {\n // a getter is used here to prevent accidental changes\n return 1 /* ComponentType.GrowOnlyValueSet */;\n },\n schema,\n has(entity) {\n return data.has(entity);\n },\n entityDeleted(entity) {\n data.delete(entity);\n },\n get(entity) {\n const values = data.get(entity);\n if (values) {\n return values.frozenSet;\n }\n else {\n return emptyReadonlySet;\n }\n },\n addValue(entity, rawValue) {\n const { set, value } = append(entity, rawValue);\n dirtyIterator.add(entity);\n const buf = new ReadWriteByteBuffer();\n schema.serialize(value, buf);\n queuedCommands.push({\n componentId,\n data: buf.toBinary(),\n entityId: entity,\n timestamp: 0,\n type: CrdtMessageType.APPEND_VALUE\n });\n return set;\n },\n *iterator() {\n for (const [entity, component] of data) {\n yield [entity, component.frozenSet];\n }\n },\n *dirtyIterator() {\n for (const entity of dirtyIterator) {\n yield entity;\n }\n },\n getCrdtUpdates() {\n // return a copy of the commands, and then clear the local copy\n dirtyIterator.clear();\n return queuedCommands.splice(0, queuedCommands.length);\n },\n updateFromCrdt(_body) {\n if (_body.type === CrdtMessageType.APPEND_VALUE) {\n const buf = new ReadWriteByteBuffer(_body.data);\n append(_body.entityId, schema.deserialize(buf));\n }\n return [null, undefined];\n },\n dumpCrdtStateToBuffer: function (buffer, filterEntity) {\n for (const [entity, { raw }] of data) {\n if (filterEntity && !filterEntity(entity))\n continue;\n for (const it of raw) {\n const buf = new ReadWriteByteBuffer();\n schema.serialize(it.value, buf);\n AppendValueOperation.write(entity, 0, componentId, buf.toBinary(), buffer);\n }\n }\n }\n };\n return ret;\n}\n", "import * as components from '../../components';\nfunction* genEntityTree(entity, entities) {\n // This avoid infinite loop when there is a cyclic parenting\n if (!entities.has(entity))\n return;\n entities.delete(entity);\n for (const [_entity, value] of entities) {\n if (value.parent === entity) {\n yield* genEntityTree(_entity, entities);\n }\n }\n yield entity;\n}\n/**\n * Get an iterator of entities that follow a tree structure for a component\n * @public\n * @param engine - the engine running the entities\n * @param entity - the root entity of the tree\n * @param component - the parenting component to filter by\n * @returns An iterator of an array as [entity, entity2, ...]\n *\n * Example:\n * ```ts\n * const TreeComponent = engine.defineComponent('custom::TreeComponent', {\n * label: Schemas.String,\n * parent: Schemas.Entity\n * })\n *\n * for (const entity of getComponentEntityTree(engine, entity, TreeComponent)) {\n * // entity in the tree\n * }\n * ```\n */\nexport function getComponentEntityTree(engine, entity, component) {\n const entities = new Map(engine.getEntitiesWith(component));\n return genEntityTree(entity, entities);\n}\n// I swear by all the gods that this is being tested on test/sdk/network/sync-engines.spec.ts\n/* istanbul ignore next */\nfunction removeNetworkEntityChildrens(engine, parent) {\n const NetworkParent = components.NetworkParent(engine);\n const NetworkEntity = components.NetworkEntity(engine);\n // Remove parent\n engine.removeEntity(parent);\n // Remove childs\n const network = NetworkEntity.getOrNull(parent);\n if (network) {\n for (const [entity, parent] of engine.getEntitiesWith(NetworkParent)) {\n if (parent.entityId === network.entityId && parent.networkId === network.networkId) {\n removeNetworkEntityChildrens(engine, entity);\n }\n }\n }\n return;\n}\n/**\n * Remove all components of each entity in the tree made with Transform parenting\n * @param engine - the engine running the entities\n * @param firstEntity - the root entity of the tree\n * @public\n */\nexport function removeEntityWithChildren(engine, entity) {\n const Transform = components.Transform(engine);\n const NetworkEntity = components.NetworkEntity(engine);\n /* istanbul ignore if */\n if (NetworkEntity.has(entity)) {\n return removeNetworkEntityChildrens(engine, entity);\n }\n for (const ent of getComponentEntityTree(engine, entity, Transform)) {\n engine.removeEntity(ent);\n }\n}\n", "import * as components from '../components';\nconst InputCommands = [\n 0 /* InputAction.IA_POINTER */,\n 1 /* InputAction.IA_PRIMARY */,\n 2 /* InputAction.IA_SECONDARY */,\n 4 /* InputAction.IA_FORWARD */,\n 5 /* InputAction.IA_BACKWARD */,\n 6 /* InputAction.IA_RIGHT */,\n 7 /* InputAction.IA_LEFT */,\n 8 /* InputAction.IA_JUMP */,\n 9 /* InputAction.IA_WALK */,\n 10 /* InputAction.IA_ACTION_3 */,\n 11 /* InputAction.IA_ACTION_4 */,\n 12 /* InputAction.IA_ACTION_5 */,\n 13 /* InputAction.IA_ACTION_6 */\n];\nconst InputStateUpdateSystemPriority = 1 << 20;\n/**\n * @internal\n */\nexport function createInputSystem(engine) {\n const PointerEventsResult = components.PointerEventsResult(engine);\n const globalState = {\n previousFrameMaxTimestamp: 0,\n currentFrameMaxTimestamp: 0,\n buttonState: new Map(),\n thisFrameCommands: []\n };\n function findLastAction(pointerEventType, inputAction, entity) {\n const ascendingTimestampIterator = PointerEventsResult.get(entity);\n for (const command of Array.from(ascendingTimestampIterator).reverse()) {\n if (command.button === inputAction && command.state === pointerEventType) {\n return command;\n }\n }\n }\n function* findCommandsByActionDescending(inputAction, entity) {\n const ascendingTimestampIterator = PointerEventsResult.get(entity);\n for (const command of Array.from(ascendingTimestampIterator).reverse()) {\n if (command.button === inputAction) {\n yield command;\n }\n }\n }\n function buttonStateUpdateSystem() {\n // first store the previous' frame timestamp\n let maxTimestamp = globalState.currentFrameMaxTimestamp;\n globalState.previousFrameMaxTimestamp = maxTimestamp;\n if (globalState.thisFrameCommands.length) {\n globalState.thisFrameCommands = [];\n }\n // then iterate over all new commands\n for (const [, commands] of engine.getEntitiesWith(PointerEventsResult)) {\n // TODO: adapt the gset component to have a cached \"reversed\" option by default\n const arrayCommands = Array.from(commands);\n for (let i = arrayCommands.length - 1; i >= 0; i--) {\n const command = arrayCommands[i];\n if (command.timestamp > maxTimestamp) {\n maxTimestamp = command.timestamp;\n }\n if (command.timestamp > globalState.previousFrameMaxTimestamp) {\n globalState.thisFrameCommands.push(command);\n }\n if (command.state === 0 /* PointerEventType.PET_UP */ || command.state === 1 /* PointerEventType.PET_DOWN */) {\n const prevCommand = globalState.buttonState.get(command.button);\n if (!prevCommand || command.timestamp > prevCommand.timestamp) {\n globalState.buttonState.set(command.button, command);\n }\n else {\n // since we are iterating a descending array, we can early finish the\n // loop\n break;\n }\n }\n }\n }\n // update current frame's max timestamp\n globalState.currentFrameMaxTimestamp = maxTimestamp;\n }\n engine.addSystem(buttonStateUpdateSystem, InputStateUpdateSystemPriority, '@dcl/ecs#inputSystem');\n function timestampIsCurrentFrame(timestamp) {\n if (timestamp > globalState.previousFrameMaxTimestamp && timestamp <= globalState.currentFrameMaxTimestamp) {\n return true;\n }\n else {\n return false;\n }\n }\n function getClick(inputAction, entity) {\n if (inputAction !== 3 /* InputAction.IA_ANY */) {\n return findClick(inputAction, entity);\n }\n for (const input of InputCommands) {\n const cmd = findClick(input, entity);\n if (cmd)\n return cmd;\n }\n return null;\n }\n function findClick(inputAction, entity) {\n let down = null;\n let up = null;\n // We search the last UP & DOWN command sorted by timestamp descending\n for (const it of findCommandsByActionDescending(inputAction, entity)) {\n if (!up) {\n if (it.state === 0 /* PointerEventType.PET_UP */) {\n up = it;\n continue;\n }\n }\n else if (!down) {\n if (it.state === 1 /* PointerEventType.PET_DOWN */) {\n down = it;\n break;\n }\n }\n }\n if (!up || !down)\n return null;\n // If the DOWN command has happen before the UP commands, it means that that a clicked has happen\n if (down.timestamp < up.timestamp && timestampIsCurrentFrame(up.timestamp)) {\n return { up, down };\n }\n return null;\n }\n function getInputCommandFromEntity(inputAction, pointerEventType, entity) {\n if (inputAction !== 3 /* InputAction.IA_ANY */) {\n return findInputCommand(inputAction, pointerEventType, entity);\n }\n for (const input of InputCommands) {\n const cmd = findInputCommand(input, pointerEventType, entity);\n if (cmd)\n return cmd;\n }\n return null;\n }\n function getInputCommand(inputAction, pointerEventType, entity) {\n if (entity) {\n return getInputCommandFromEntity(inputAction, pointerEventType, entity);\n }\n else {\n for (const command of globalState.thisFrameCommands) {\n if ((command.button === inputAction || inputAction === 3 /* InputAction.IA_ANY */) &&\n command.state === pointerEventType) {\n return command;\n }\n }\n return null;\n }\n }\n function findInputCommand(inputAction, pointerEventType, entity) {\n // We search the last pointer Event command sorted by timestamp\n const command = findLastAction(pointerEventType, inputAction, entity);\n if (!command)\n return null;\n if (timestampIsCurrentFrame(command.timestamp)) {\n return command;\n }\n else {\n return null;\n }\n }\n // returns true if there was a DOWN (in any past frame), and then an UP in the last frame\n function isClicked(inputAction, entity) {\n return getClick(inputAction, entity) !== null;\n }\n // returns true if the provided last action was triggered in the last frame\n function isTriggered(inputAction, pointerEventType, entity) {\n if (entity) {\n const command = findLastAction(pointerEventType, inputAction, entity);\n return (command && timestampIsCurrentFrame(command.timestamp)) || false;\n }\n else {\n for (const command of globalState.thisFrameCommands) {\n if ((command.button === inputAction || inputAction === 3 /* InputAction.IA_ANY */) &&\n command.state === pointerEventType) {\n return true;\n }\n }\n return false;\n }\n }\n // returns the global state of the input. This global state is updated from the system\n function isPressed(inputAction) {\n return globalState.buttonState.get(inputAction)?.state === 1 /* PointerEventType.PET_DOWN */;\n }\n return {\n isPressed,\n getClick,\n getInputCommand,\n isClicked,\n isTriggered\n };\n}\n", "/**\n * Component types are used to pick the wire protocol and the conflict resolution algorithm\n * @public\n */\nexport var ComponentType;\n(function (ComponentType) {\n ComponentType[ComponentType[\"LastWriteWinElementSet\"] = 0] = \"LastWriteWinElementSet\";\n ComponentType[ComponentType[\"GrowOnlyValueSet\"] = 1] = \"GrowOnlyValueSet\";\n})(ComponentType || (ComponentType = {}));\n", "import * as components from '../components';\nimport { componentNumberFromName } from '../components/component-number';\nimport { checkNotThenable } from '../runtime/invariant';\nimport { Schemas } from '../schemas';\nimport { crdtSceneSystem } from '../systems/crdt';\nimport { createComponentDefinitionFromSchema } from './lww-element-set-component-definition';\nimport { EntityContainer } from './entity';\nimport { SystemContainer, SYSTEMS_REGULAR_PRIORITY } from './systems';\nimport { createValueSetComponentDefinitionFromSchema } from './grow-only-value-set-component-definition';\nimport { removeEntityWithChildren as removeEntityWithChildrenEngine } from '../runtime/helpers/tree';\nexport * from './input';\nexport * from './readonly';\nexport * from './types';\nfunction preEngine() {\n const entityContainer = EntityContainer();\n const componentsDefinition = new Map();\n const systems = SystemContainer();\n let sealed = false;\n function addSystem(fn, priority = SYSTEMS_REGULAR_PRIORITY, name) {\n systems.add(fn, priority, name);\n }\n function removeSystem(selector) {\n return systems.remove(selector);\n }\n function addEntity() {\n const entity = entityContainer.generateEntity();\n return entity;\n }\n function removeEntity(entity) {\n for (const [, component] of componentsDefinition) {\n // TODO: hack for the moment. It should be enough to delete the entity, but the renderer is not cleaning the components.\n // So we still need the NetworkEntity to forward this message to the SyncTransport.\n if (component.componentName === 'core-schema::Network-Entity')\n continue;\n component.entityDeleted(entity, true);\n }\n return entityContainer.removeEntity(entity);\n }\n function removeEntityWithChildren(entity) {\n return removeEntityWithChildrenEngine({ removeEntity, defineComponentFromSchema, getEntitiesWith, defineComponent }, entity);\n }\n function registerComponentDefinition(componentName, component) {\n /* istanbul ignore next */\n if (sealed)\n throw new Error('Engine is already sealed. No components can be added at this stage');\n const componentId = componentNumberFromName(componentName);\n const prev = componentsDefinition.get(componentId);\n if (prev) {\n throw new Error(`Component number ${componentId} was already registered.`);\n }\n /* istanbul ignore next */\n if (component.componentName !== componentName) {\n throw new Error(`Component name doesn't match componentDefinition.componentName ${componentName} != ${component.componentName}`);\n }\n /* istanbul ignore next */\n if (component.componentId !== componentId) {\n throw new Error(`Component number doesn't match componentDefinition.componentId ${componentId} != ${component.componentId}`);\n }\n componentsDefinition.set(componentId, component);\n return component;\n }\n function defineComponentFromSchema(componentName, schema) {\n const componentId = componentNumberFromName(componentName);\n const prev = componentsDefinition.get(componentId);\n if (prev) {\n // TODO: assert spec === prev.spec\n return prev;\n }\n /* istanbul ignore next */\n if (sealed)\n throw new Error('Engine is already sealed. No components can be added at this stage');\n const newComponent = createComponentDefinitionFromSchema(componentName, componentId, schema);\n componentsDefinition.set(componentId, newComponent);\n return newComponent;\n }\n function defineValueSetComponentFromSchema(componentName, schema, options) {\n const componentId = componentNumberFromName(componentName);\n const prev = componentsDefinition.get(componentId);\n if (prev) {\n // TODO: assert spec === prev.spec\n return prev;\n }\n /* istanbul ignore next */\n if (sealed)\n throw new Error('Engine is already sealed. No components can be added at this stage');\n const newComponent = createValueSetComponentDefinitionFromSchema(componentName, componentId, schema, options);\n componentsDefinition.set(componentId, newComponent);\n return newComponent;\n }\n function defineComponent(componentName, mapSpec, constructorDefault) {\n const componentId = componentNumberFromName(componentName);\n const prev = componentsDefinition.get(componentId);\n if (prev) {\n // TODO: assert spec === prev.spec\n return prev;\n }\n if (sealed)\n throw new Error('Engine is already sealed. No components can be added at this stage');\n const schemaSpec = Schemas.Map(mapSpec, constructorDefault);\n const def = createComponentDefinitionFromSchema(componentName, componentId, schemaSpec);\n const newComponent = {\n ...def,\n create(entity, val) {\n return def.create(entity, val);\n },\n createOrReplace(entity, val) {\n return def.createOrReplace(entity, val);\n }\n };\n componentsDefinition.set(componentId, newComponent);\n return newComponent;\n }\n function getComponent(componentIdOrName) {\n const componentId = typeof componentIdOrName === 'number' ? componentIdOrName : componentNumberFromName(componentIdOrName);\n const component = componentsDefinition.get(componentId);\n if (!component) {\n throw new Error(`Component ${componentIdOrName} not found. You need to declare the components at the beginnig of the engine declaration`);\n }\n return component;\n }\n function getComponentOrNull(componentIdOrName) {\n const componentId = typeof componentIdOrName === 'number' ? componentIdOrName : componentNumberFromName(componentIdOrName);\n return (componentsDefinition.get(componentId) ??\n /* istanbul ignore next */\n null);\n }\n function* getEntitiesWith(...components) {\n for (const [entity, ...groupComp] of getComponentDefGroup(...components)) {\n yield [entity, ...groupComp.map((c) => c.get(entity))];\n }\n }\n function getEntityOrNullByName(value) {\n const LabelComponent = components.Name({ defineComponent });\n for (const [entity, name] of getEntitiesWith(LabelComponent)) {\n if (name.value === value)\n return entity;\n }\n return null;\n }\n function* getComponentDefGroup(...args) {\n const [firstComponentDef, ...componentDefinitions] = args;\n for (const [entity] of firstComponentDef.iterator()) {\n let matches = true;\n for (const componentDef of componentDefinitions) {\n if (!componentDef.has(entity)) {\n matches = false;\n break;\n }\n }\n if (matches) {\n yield [entity, ...args];\n }\n }\n }\n function getSystems() {\n return systems.getSystems();\n }\n function componentsIter() {\n return componentsDefinition.values();\n }\n function removeComponentDefinition(componentIdOrName) {\n if (sealed)\n throw new Error('Engine is already sealed. No components can be removed at this stage');\n const componentId = typeof componentIdOrName === 'number' ? componentIdOrName : componentNumberFromName(componentIdOrName);\n componentsDefinition.delete(componentId);\n }\n components.Transform({ defineComponentFromSchema });\n function seal() {\n if (!sealed) {\n sealed = true;\n }\n }\n return {\n addEntity,\n removeEntity,\n removeEntityWithChildren,\n addSystem,\n getSystems,\n removeSystem,\n defineComponent,\n defineComponentFromSchema,\n defineValueSetComponentFromSchema,\n getEntitiesWith,\n getComponent,\n getComponentOrNull: getComponentOrNull,\n getEntityOrNullByName,\n removeComponentDefinition,\n registerComponentDefinition,\n entityContainer,\n componentsIter,\n seal\n };\n}\n/**\n * Internal constructor of new engines, this is an internal API\n * @public\n * @deprecated Prevent manual usage prefer \"engine\" for scene development\n */\nexport function Engine(options) {\n const partialEngine = preEngine();\n const crdtSystem = crdtSceneSystem(partialEngine, options?.onChangeFunction || null);\n async function update(dt) {\n await crdtSystem.receiveMessages();\n for (const system of partialEngine.getSystems()) {\n const ret = system.fn(dt);\n checkNotThenable(ret, `A system (${system.name || 'anonymous'}) returned a thenable. Systems cannot be async functions. Documentation: https://dcl.gg/sdk/sync-systems`);\n }\n // get the deleted entities to send the DeleteEntity CRDT commands\n const deletedEntites = partialEngine.entityContainer.releaseRemovedEntities();\n await crdtSystem.sendMessages(deletedEntites);\n }\n return {\n addEntity: partialEngine.addEntity,\n removeEntity: partialEngine.removeEntity,\n removeEntityWithChildren: partialEngine.removeEntityWithChildren,\n addSystem: partialEngine.addSystem,\n removeSystem: partialEngine.removeSystem,\n defineComponent: partialEngine.defineComponent,\n defineComponentFromSchema: partialEngine.defineComponentFromSchema,\n defineValueSetComponentFromSchema: partialEngine.defineValueSetComponentFromSchema,\n registerComponentDefinition: partialEngine.registerComponentDefinition,\n getEntitiesWith: partialEngine.getEntitiesWith,\n getComponent: partialEngine.getComponent,\n getComponentOrNull: partialEngine.getComponentOrNull,\n removeComponentDefinition: partialEngine.removeComponentDefinition,\n componentsIter: partialEngine.componentsIter,\n seal: partialEngine.seal,\n getEntityOrNullByName: partialEngine.getEntityOrNullByName,\n update,\n RootEntity: 0,\n PlayerEntity: 1,\n CameraEntity: 2,\n getEntityState: partialEngine.entityContainer.getEntityState,\n addTransport: crdtSystem.addTransport,\n entityContainer: partialEngine.entityContainer\n };\n}\n", "function getAndClean(value) {\n const messagesToProcess = Array.from(value);\n value.length = 0;\n return messagesToProcess;\n}\n/**\n * @internal\n */\nexport function createTaskSystem(engine) {\n const tasks = [];\n async function runTask(task) {\n try {\n const resp = await task();\n return resp;\n }\n catch (e) {\n console.error(e);\n }\n }\n function executeTasks() {\n for (const task of getAndClean(tasks)) {\n runTask(task).catch(console.error);\n }\n }\n engine.addSystem(executeTasks);\n return function (task) {\n tasks.push(task);\n };\n}\n", "import * as components from '../components';\nimport { EntityState } from '../engine/entity';\nimport { checkNotThenable } from '../runtime/invariant';\n/**\n * @internal\n */\nexport function createPointerEventsSystem(engine, inputSystem) {\n const PointerEvents = components.PointerEvents(engine);\n let EventType;\n (function (EventType) {\n EventType[EventType[\"Click\"] = 0] = \"Click\";\n EventType[EventType[\"Down\"] = 1] = \"Down\";\n EventType[EventType[\"Up\"] = 2] = \"Up\";\n })(EventType || (EventType = {}));\n const getDefaultOpts = (opts = {}) => ({\n button: 3 /* InputAction.IA_ANY */,\n ...opts\n });\n const eventsMap = new Map();\n function getEvent(entity) {\n return eventsMap.get(entity) || eventsMap.set(entity, new Map()).get(entity);\n }\n function setPointerEvent(entity, type, opts) {\n if (opts.hoverText || opts.showFeedback) {\n const pointerEvent = PointerEvents.getMutableOrNull(entity) || PointerEvents.create(entity);\n pointerEvent.pointerEvents.push({\n eventType: type,\n eventInfo: {\n button: opts.button,\n showFeedback: opts.showFeedback,\n hoverText: opts.hoverText,\n maxDistance: opts.maxDistance\n }\n });\n }\n }\n function removePointerEvent(entity, type, button) {\n const pointerEvent = PointerEvents.getMutableOrNull(entity);\n if (!pointerEvent)\n return;\n pointerEvent.pointerEvents = pointerEvent.pointerEvents.filter((pointer) => !(pointer.eventInfo?.button === button && pointer.eventType === type));\n }\n function getPointerEvent(eventType) {\n if (eventType === EventType.Up) {\n return 0 /* PointerEventType.PET_UP */;\n }\n return 1 /* PointerEventType.PET_DOWN */;\n }\n function removeEvent(entity, type) {\n const event = getEvent(entity);\n const pointerEvent = event.get(type);\n if (pointerEvent?.opts.hoverText) {\n removePointerEvent(entity, getPointerEvent(type), pointerEvent.opts.button);\n }\n event.delete(type);\n }\n // @internal\n engine.addSystem(function EventSystem() {\n for (const [entity, event] of eventsMap) {\n if (engine.getEntityState(entity) === EntityState.Removed) {\n eventsMap.delete(entity);\n continue;\n }\n for (const [eventType, { cb, opts }] of event) {\n if (eventType === EventType.Click) {\n const command = inputSystem.getClick(opts.button, entity);\n if (command)\n checkNotThenable(cb(command.up), 'Click event returned a thenable. Only synchronous functions are allowed');\n }\n if (eventType === EventType.Down || eventType === EventType.Up) {\n const command = inputSystem.getInputCommand(opts.button, getPointerEvent(eventType), entity);\n if (command) {\n checkNotThenable(cb(command), 'Event handler returned a thenable. Only synchronous functions are allowed');\n }\n }\n }\n }\n });\n const onPointerDown = (...args) => {\n const [data, cb, maybeOpts] = args;\n if (typeof data === 'number') {\n return onPointerDown({ entity: data, opts: maybeOpts ?? {} }, cb);\n }\n const { entity, opts } = data;\n const options = getDefaultOpts(opts);\n removeEvent(entity, EventType.Down);\n getEvent(entity).set(EventType.Down, { cb, opts: options });\n setPointerEvent(entity, 1 /* PointerEventType.PET_DOWN */, options);\n };\n const onPointerUp = (...args) => {\n const [data, cb, maybeOpts] = args;\n if (typeof data === 'number') {\n return onPointerUp({ entity: data, opts: maybeOpts ?? {} }, cb);\n }\n const { entity, opts } = data;\n const options = getDefaultOpts(opts);\n removeEvent(entity, EventType.Up);\n getEvent(entity).set(EventType.Up, { cb, opts: options });\n setPointerEvent(entity, 0 /* PointerEventType.PET_UP */, options);\n };\n return {\n removeOnClick(entity) {\n removeEvent(entity, EventType.Click);\n },\n removeOnPointerDown(entity) {\n removeEvent(entity, EventType.Down);\n },\n removeOnPointerUp(entity) {\n removeEvent(entity, EventType.Up);\n },\n onClick(value, cb) {\n const { entity } = value;\n const options = getDefaultOpts(value.opts);\n // Clear previous event with over feedback included\n removeEvent(entity, EventType.Click);\n // Set new event\n getEvent(entity).set(EventType.Click, { cb, opts: options });\n setPointerEvent(entity, 1 /* PointerEventType.PET_DOWN */, options);\n },\n onPointerDown,\n onPointerUp\n };\n}\n", "import * as components from '../components';\nimport { ReadWriteByteBuffer } from '../serialization/ByteBuffer';\nimport { dataCompare } from './crdt/utils';\n/**\n * @internal\n * @returns tween helper to be used on the scene\n */\nexport function createTweenSystem(engine) {\n const Tween = components.Tween(engine);\n const TweenState = components.TweenState(engine);\n const TweenSequence = components.TweenSequence(engine);\n const cache = new Map();\n function isCompleted(entity) {\n const tweenState = TweenState.getOrNull(entity);\n const tween = Tween.getOrNull(entity);\n const tweenCache = cache.get(entity);\n if (!tweenState || !tween)\n return false;\n /* istanbul ignore next */\n if (\n // Renderer notified that the tween is completed\n (tweenChanged(entity) || tweenState.state === 1 /* TweenStateStatus.TS_COMPLETED */) &&\n // Avoid sending isCompleted multiple times\n !tweenCache?.completed &&\n // Amount of frames needed to consider a tween completed\n (tweenCache?.frames ?? 0) > 2) {\n return true;\n }\n return false;\n }\n function tweenChanged(entity) {\n const currentTween = Tween.getOrNull(entity);\n const prevTween = cache.get(entity)?.tween;\n /* istanbul ignore next */\n if ((currentTween && !prevTween) || (!currentTween && prevTween)) {\n return true;\n }\n const currentBuff = new ReadWriteByteBuffer();\n Tween.schema.serialize(currentTween, currentBuff);\n const equal = dataCompare(currentBuff.toBinary(), prevTween);\n return equal;\n }\n const restartTweens = [];\n // Logic for sequence tweens\n engine.addSystem(() => {\n for (const restart of restartTweens) {\n restart();\n }\n restartTweens.length = 0;\n for (const [entity, tween] of engine.getEntitiesWith(Tween)) {\n if (tweenChanged(entity)) {\n const buffer = new ReadWriteByteBuffer();\n Tween.schema.serialize(tween, buffer);\n cache.set(entity, {\n tween: buffer.toBinary(),\n frames: 0,\n completed: false,\n changed: true\n });\n continue;\n }\n const tweenCache = cache.get(entity);\n tweenCache.frames += 1;\n tweenCache.changed = false;\n if (isCompleted(entity)) {\n // Reset tween frames.\n tweenCache.frames = 0;\n // set the tween completed to avoid calling this again for the same tween\n tweenCache.completed = true;\n const tweenSequence = TweenSequence.getOrNull(entity);\n if (!tweenSequence)\n continue;\n const { sequence } = tweenSequence;\n if (sequence && sequence.length) {\n const [nextTweenSequence, ...otherTweens] = sequence;\n Tween.createOrReplace(entity, nextTweenSequence);\n const mutableTweenHelper = TweenSequence.getMutable(entity);\n mutableTweenHelper.sequence = otherTweens;\n if (tweenSequence.loop === 0 /* TweenLoop.TL_RESTART */) {\n mutableTweenHelper.sequence.push(tween);\n }\n }\n else if (tweenSequence.loop === 1 /* TweenLoop.TL_YOYO */) {\n Tween.createOrReplace(entity, backwardsTween(tween));\n }\n else if (tweenSequence.loop === 0 /* TweenLoop.TL_RESTART */) {\n Tween.deleteFrom(entity);\n cache.delete(entity);\n restartTweens.push(() => {\n Tween.createOrReplace(entity, tween);\n });\n }\n }\n }\n }, Number.NEGATIVE_INFINITY);\n function backwardsTween(tween) {\n if (tween.mode?.$case === 'move' && tween.mode.move) {\n return { ...tween, mode: { ...tween.mode, move: { start: tween.mode.move.end, end: tween.mode.move.start } } };\n }\n if (tween.mode?.$case === 'rotate' && tween.mode.rotate) {\n return {\n ...tween,\n mode: { ...tween.mode, rotate: { start: tween.mode.rotate.end, end: tween.mode.rotate.start } }\n };\n }\n if (tween.mode?.$case === 'scale' && tween.mode.scale) {\n return { ...tween, mode: { ...tween.mode, scale: { start: tween.mode.scale.end, end: tween.mode.scale.start } } };\n }\n /* istanbul ignore next */\n throw new Error('Invalid tween');\n }\n return {\n // This event is fired only once per tween\n tweenCompleted: isCompleted\n };\n}\n", "/**\n * @alpha * This file initialization is an alpha one. This is based on the old-ecs\n * init and it'll be changing.\n */\nimport { Engine } from '../../engine';\nimport { createTaskSystem } from '../../systems/async-task';\nimport { createPointerEventsSystem } from '../../systems/events';\nimport { createInputSystem } from './../../engine/input';\nimport { createRaycastSystem } from '../../systems/raycast';\nimport { createVideoEventsSystem } from '../../systems/videoEvents';\nimport { createTweenSystem } from '../../systems/tween';\n/**\n * @public\n * The engine is the part of the scene that sits in the middle and manages all of the other parts.\n * It determines what entities are rendered and how players interact with them.\n * It also coordinates what functions from systems are executed and when.\n *\n * @example\n * import { engine } from '@dcl/sdk/ecs'\n * const entity = engine.addEntity()\n * engine.addSystem(someSystemFunction)\n *\n */\nexport const engine = /* @__PURE__ */ Engine();\n/**\n * @public\n * Input system manager. Check for button events\n * @example\n * inputSystem.isTriggered: Returns true if an input action ocurred since the last tick.\n * inputSystem.isPressed: Returns true if an input is currently being pressed down. It will return true on every tick until the button goes up again.\n * inputSystem.getInputCommand: Returns an object with data about the input action.\n */\nexport const inputSystem = /* @__PURE__ */ createInputSystem(engine);\n/**\n * @public\n * Register callback functions to a particular entity on input events.\n */\nexport const pointerEventsSystem = /* @__PURE__ */ createPointerEventsSystem(engine, inputSystem);\n/**\n * @public\n * Register callback functions to a particular entity on raycast results.\n */\nexport const raycastSystem = /* @__PURE__ */ createRaycastSystem(engine);\n/**\n * @public\n * Register callback functions to a particular entity on video events.\n */\nexport const videoEventsSystem = /* @__PURE__ */ createVideoEventsSystem(engine);\n/**\n * @public\n * Register callback functions to a particular entity on video events.\n */\nexport const tweenSystem = createTweenSystem(engine);\n/**\n * @public\n * Runs an async function\n */\nexport const executeTask = /* @__PURE__ */ createTaskSystem(engine);\n", "import { engine } from '../../runtime/initialization';\nimport * as components from './index.gen';\nexport * from './index.gen';\n/** @public */ export const AudioSource = /* @__PURE__ */ components.AudioSource(engine);\n/** @public */ export const AudioStream = /* @__PURE__ */ components.AudioStream(engine);\n/** @public */ export const AvatarAttach = /* @__PURE__ */ components.AvatarAttach(engine);\n/** @public */ export const AvatarModifierArea = /* @__PURE__ */ components.AvatarModifierArea(engine);\n/** @public */ export const AvatarShape = /* @__PURE__ */ components.AvatarShape(engine);\n/** @public */ export const Billboard = /* @__PURE__ */ components.Billboard(engine);\n/** @public */ export const CameraMode = /* @__PURE__ */ components.CameraMode(engine);\n/** @public */ export const CameraModeArea = /* @__PURE__ */ components.CameraModeArea(engine);\n/** @public */ export const EngineInfo = /* @__PURE__ */ components.EngineInfo(engine);\n/** @public */ export const GltfContainer = /* @__PURE__ */ components.GltfContainer(engine);\n/** @public */ export const GltfContainerLoadingState = /* @__PURE__ */ components.GltfContainerLoadingState(engine);\n/** @public */ export const NftShape = /* @__PURE__ */ components.NftShape(engine);\n/** @public */ export const PointerEvents = /* @__PURE__ */ components.PointerEvents(engine);\n/** @public */ export const PointerEventsResult = /* @__PURE__ */ components.PointerEventsResult(engine);\n/** @public */ export const PointerLock = /* @__PURE__ */ components.PointerLock(engine);\n/** @public */ export const Raycast = /* @__PURE__ */ components.Raycast(engine);\n/** @public */ export const RaycastResult = /* @__PURE__ */ components.RaycastResult(engine);\n/** @public */ export const TextShape = /* @__PURE__ */ components.TextShape(engine);\n/** @public */ export const TweenSequence = /* @__PURE__ */ components.TweenSequence(engine);\n/** @public */ export const TweenState = /* @__PURE__ */ components.TweenState(engine);\n/** @public */ export const UiBackground = /* @__PURE__ */ components.UiBackground(engine);\n/** @public */ export const UiCanvasInformation = /* @__PURE__ */ components.UiCanvasInformation(engine);\n/** @public */ export const UiDropdown = /* @__PURE__ */ components.UiDropdown(engine);\n/** @public */ export const UiDropdownResult = /* @__PURE__ */ components.UiDropdownResult(engine);\n/** @public */ export const UiInput = /* @__PURE__ */ components.UiInput(engine);\n/** @public */ export const UiInputResult = /* @__PURE__ */ components.UiInputResult(engine);\n/** @public */ export const UiText = /* @__PURE__ */ components.UiText(engine);\n/** @public */ export const UiTransform = /* @__PURE__ */ components.UiTransform(engine);\n/** @public */ export const VideoEvent = /* @__PURE__ */ components.VideoEvent(engine);\n/** @public */ export const VideoPlayer = /* @__PURE__ */ components.VideoPlayer(engine);\n/** @public */ export const VisibilityComponent = /* @__PURE__ */ components.VisibilityComponent(engine);\n", "/* eslint-disable */\nconst protobufPackageSarasa = \"decentraland.sdk.components.common\";\n/**\n * @public\n */\nexport var CameraType;\n(function (CameraType) {\n CameraType[CameraType[\"CT_FIRST_PERSON\"] = 0] = \"CT_FIRST_PERSON\";\n CameraType[CameraType[\"CT_THIRD_PERSON\"] = 1] = \"CT_THIRD_PERSON\";\n /** CT_CINEMATIC - controlled by the scene */\n CameraType[CameraType[\"CT_CINEMATIC\"] = 2] = \"CT_CINEMATIC\";\n})(CameraType || (CameraType = {}));\n", "/* eslint-disable */\nconst protobufPackageSarasa = \"decentraland.sdk.components.common\";\n/**\n * @public\n */\nexport var InputAction;\n(function (InputAction) {\n InputAction[InputAction[\"IA_POINTER\"] = 0] = \"IA_POINTER\";\n InputAction[InputAction[\"IA_PRIMARY\"] = 1] = \"IA_PRIMARY\";\n InputAction[InputAction[\"IA_SECONDARY\"] = 2] = \"IA_SECONDARY\";\n InputAction[InputAction[\"IA_ANY\"] = 3] = \"IA_ANY\";\n InputAction[InputAction[\"IA_FORWARD\"] = 4] = \"IA_FORWARD\";\n InputAction[InputAction[\"IA_BACKWARD\"] = 5] = \"IA_BACKWARD\";\n InputAction[InputAction[\"IA_RIGHT\"] = 6] = \"IA_RIGHT\";\n InputAction[InputAction[\"IA_LEFT\"] = 7] = \"IA_LEFT\";\n InputAction[InputAction[\"IA_JUMP\"] = 8] = \"IA_JUMP\";\n InputAction[InputAction[\"IA_WALK\"] = 9] = \"IA_WALK\";\n InputAction[InputAction[\"IA_ACTION_3\"] = 10] = \"IA_ACTION_3\";\n InputAction[InputAction[\"IA_ACTION_4\"] = 11] = \"IA_ACTION_4\";\n InputAction[InputAction[\"IA_ACTION_5\"] = 12] = \"IA_ACTION_5\";\n InputAction[InputAction[\"IA_ACTION_6\"] = 13] = \"IA_ACTION_6\";\n})(InputAction || (InputAction = {}));\n/** PointerEventType is a kind of interaction that can be detected. */\n/**\n * @public\n */\nexport var PointerEventType;\n(function (PointerEventType) {\n PointerEventType[PointerEventType[\"PET_UP\"] = 0] = \"PET_UP\";\n PointerEventType[PointerEventType[\"PET_DOWN\"] = 1] = \"PET_DOWN\";\n PointerEventType[PointerEventType[\"PET_HOVER_ENTER\"] = 2] = \"PET_HOVER_ENTER\";\n PointerEventType[PointerEventType[\"PET_HOVER_LEAVE\"] = 3] = \"PET_HOVER_LEAVE\";\n})(PointerEventType || (PointerEventType = {}));\n", "/* eslint-disable */\nconst protobufPackageSarasa = \"decentraland.sdk.components.common\";\n/**\n * @public\n */\nexport var LoadingState;\n(function (LoadingState) {\n LoadingState[LoadingState[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n LoadingState[LoadingState[\"LOADING\"] = 1] = \"LOADING\";\n LoadingState[LoadingState[\"NOT_FOUND\"] = 2] = \"NOT_FOUND\";\n LoadingState[LoadingState[\"FINISHED_WITH_ERROR\"] = 3] = \"FINISHED_WITH_ERROR\";\n LoadingState[LoadingState[\"FINISHED\"] = 4] = \"FINISHED\";\n})(LoadingState || (LoadingState = {}));\n", "/* eslint-disable */\nconst protobufPackageSarasa = \"decentraland.sdk.components.common\";\n/**\n * @public\n */\nexport var TextAlignMode;\n(function (TextAlignMode) {\n TextAlignMode[TextAlignMode[\"TAM_TOP_LEFT\"] = 0] = \"TAM_TOP_LEFT\";\n TextAlignMode[TextAlignMode[\"TAM_TOP_CENTER\"] = 1] = \"TAM_TOP_CENTER\";\n TextAlignMode[TextAlignMode[\"TAM_TOP_RIGHT\"] = 2] = \"TAM_TOP_RIGHT\";\n TextAlignMode[TextAlignMode[\"TAM_MIDDLE_LEFT\"] = 3] = \"TAM_MIDDLE_LEFT\";\n TextAlignMode[TextAlignMode[\"TAM_MIDDLE_CENTER\"] = 4] = \"TAM_MIDDLE_CENTER\";\n TextAlignMode[TextAlignMode[\"TAM_MIDDLE_RIGHT\"] = 5] = \"TAM_MIDDLE_RIGHT\";\n TextAlignMode[TextAlignMode[\"TAM_BOTTOM_LEFT\"] = 6] = \"TAM_BOTTOM_LEFT\";\n TextAlignMode[TextAlignMode[\"TAM_BOTTOM_CENTER\"] = 7] = \"TAM_BOTTOM_CENTER\";\n TextAlignMode[TextAlignMode[\"TAM_BOTTOM_RIGHT\"] = 8] = \"TAM_BOTTOM_RIGHT\";\n})(TextAlignMode || (TextAlignMode = {}));\n/**\n * @public\n */\nexport var Font;\n(function (Font) {\n Font[Font[\"F_SANS_SERIF\"] = 0] = \"F_SANS_SERIF\";\n Font[Font[\"F_SERIF\"] = 1] = \"F_SERIF\";\n Font[Font[\"F_MONOSPACE\"] = 2] = \"F_MONOSPACE\";\n})(Font || (Font = {}));\n", "import { Schemas } from '../schemas';\n/**\n * @public\n * @deprecated composite is not being supported so far, please do not use this feature\n */\nexport function getCompositeRootComponent(engine) {\n const component = engine.getComponentOrNull('composite::root');\n if (component) {\n return component;\n }\n return engine.defineComponent('composite::root', {\n src: Schemas.String,\n entities: Schemas.Array(Schemas.Map({\n src: Schemas.Entity,\n dest: Schemas.Entity\n }))\n });\n}\n", "const currentWorkingDir = '/';\n/**\n * The functions `normalizeStringPosix`, `dirname` and `resolve`\n * were extracted from package @browserify/path\n */\n/* istanbul ignore next */\nfunction normalizeStringPosix(path, allowAboveRoot = false) {\n let res = '';\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let code;\n for (let i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47; /*/*/\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n }\n else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 ||\n lastSegmentLength !== 2 ||\n res.charCodeAt(res.length - 1) !== 46 /*.*/ ||\n res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n }\n else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n }\n else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n }\n else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n }\n else {\n dots = -1;\n }\n }\n return res;\n}\n/* istanbul ignore next */\nexport function resolve(...args) {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n let cwd;\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n let path;\n if (i >= 0)\n path = args[i];\n else {\n if (cwd === undefined)\n cwd = currentWorkingDir;\n path = cwd;\n }\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47; /*/*/\n }\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n }\n else if (resolvedPath.length > 0) {\n return resolvedPath;\n }\n else {\n return '.';\n }\n}\n/* istanbul ignore next */\nexport function dirname(path) {\n if (path.length === 0)\n return '.';\n let code = path.charCodeAt(0);\n const hasRoot = code === 47; /*/*/\n let end = -1;\n let matchedSlash = true;\n for (let i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n }\n else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n if (end === -1)\n return hasRoot ? '/' : '.';\n if (hasRoot && end === 1)\n return '//';\n return path.slice(0, end);\n}\nexport function resolveComposite(path, cwd) {\n const absolutePath = path.startsWith('.') ? resolve(cwd, path) : resolve(path);\n return absolutePath.substring(1);\n}\n", "import { componentDefinitionByName } from '../components';\nimport { componentNumberFromName } from '../components/component-number';\nimport { Schemas } from '../schemas';\nimport { ReadWriteByteBuffer } from '../serialization/ByteBuffer';\nimport { getCompositeRootComponent } from './components';\nimport * as path from './path';\n/** @public */\n/* @__PURE__ */\nexport var EntityMappingMode;\n(function (EntityMappingMode) {\n EntityMappingMode[EntityMappingMode[\"EMM_NONE\"] = 0] = \"EMM_NONE\";\n EntityMappingMode[EntityMappingMode[\"EMM_NEXT_AVAILABLE\"] = 1] = \"EMM_NEXT_AVAILABLE\";\n EntityMappingMode[EntityMappingMode[\"EMM_DIRECT_MAPPING\"] = 2] = \"EMM_DIRECT_MAPPING\";\n})(EntityMappingMode || (EntityMappingMode = {}));\n/**\n * Return the component value from composite data\n * @internal\n */\nexport function getComponentValue(componentDefinition, component) {\n if (component.data?.$case === 'json') {\n return component.data.json;\n }\n else {\n return componentDefinition.schema.deserialize(new ReadWriteByteBuffer(component.data?.binary));\n }\n}\n/**\n * Return the component definition from composite info\n * @internal\n */\nexport function getComponentDefinition(engine, component) {\n const existingComponentDefinition = engine.getComponentOrNull(component.name);\n if (!existingComponentDefinition) {\n if (component.name.startsWith('core::')) {\n if (component.name in componentDefinitionByName) {\n return componentDefinitionByName[component.name](engine);\n }\n else {\n throw new Error(`The core component ${component.name} was not found.`);\n }\n }\n else if (component.jsonSchema) {\n return engine.defineComponentFromSchema(component.name, Schemas.fromJson(component.jsonSchema));\n }\n else {\n throw new Error(`${component.name} is not defined and there is no schema to define it.`);\n }\n }\n else {\n return existingComponentDefinition;\n }\n}\n/**\n * Return the entity mapping or fail if there is no more\n * @internal\n */\nexport function getEntityMapping(engine, compositeEntity, mappedEntities, { entityMapping }) {\n const existingEntity = mappedEntities.get(compositeEntity);\n if (existingEntity) {\n return existingEntity;\n }\n if (entityMapping?.type === EntityMappingMode.EMM_DIRECT_MAPPING) {\n const entity = entityMapping.getCompositeEntity(compositeEntity);\n mappedEntities.set(compositeEntity, entity);\n return entity;\n }\n // This function in runtime can be just `engine.addEntity()`\n const newEntity = entityMapping?.type === EntityMappingMode.EMM_NEXT_AVAILABLE\n ? entityMapping.getNextAvailableEntity()\n : engine.addEntity();\n if (newEntity === null) {\n throw new Error('There is no more entities to allocate');\n }\n mappedEntities.set(compositeEntity, newEntity);\n return newEntity;\n}\n/**\n * @internal\n */\n/* @__PURE__ */\nexport function instanceComposite(engine, compositeResource, compositeProvider, options) {\n const { rootEntity, alreadyRequestedSrc: optionalAlreadyRequestedSrc, entityMapping } = options;\n const alreadyRequestedSrc = optionalAlreadyRequestedSrc || new Set();\n const compositeDirectoryPath = path.dirname(path.resolve(compositeResource.src));\n const TransformComponentNumber = componentNumberFromName('core::Transform');\n const CompositeRootComponent = getCompositeRootComponent(engine);\n // Key => EntityNumber from the composite\n // Value => EntityNumber in current engine\n const mappedEntities = new Map();\n const getCompositeEntity = (compositeEntity) => getEntityMapping(engine, compositeEntity, mappedEntities, options);\n // ## 1 ##\n // First entity that I want to map, the root entity from the composite to the target entity in the engine\n // If there is no `rootEntity` passed, we assign one from `getNextAvailableEntity`\n const compositeRootEntity = rootEntity ?? getCompositeEntity(0);\n if (rootEntity) {\n mappedEntities.set(0, rootEntity);\n }\n // ## 2 ##\n // If there are more composite inside this one, we instance first.\n // => This is not only a copy, we need to instance. Otherwise, we'd be missing that branches\n // => TODO: in the future, the instanciation is first, then the overides (to parameterize Composite, e.g. house with different wall colors)\n const childrenComposite = compositeResource.composite.components.find((item) => item.name === CompositeRootComponent.componentName);\n if (childrenComposite) {\n for (const [childCompositeEntity, compositeRawData] of childrenComposite.data) {\n const childComposite = getComponentValue(CompositeRootComponent, compositeRawData);\n const childCompositePath = path.resolveComposite(childComposite.src, compositeDirectoryPath);\n const childCompositeResource = compositeProvider.getCompositeOrNull(childCompositePath);\n const targetEntity = getCompositeEntity(childCompositeEntity);\n if (childCompositeResource) {\n if (alreadyRequestedSrc.has(childCompositeResource.src) ||\n childCompositeResource.src === compositeResource.src) {\n throw new Error(`Composite ${compositeResource.src} has a recursive instanciation while try to instance ${childCompositeResource.src}. Previous instances: ${alreadyRequestedSrc.toString()}`);\n }\n instanceComposite(engine, childCompositeResource, compositeProvider, {\n rootEntity: targetEntity,\n alreadyRequestedSrc: new Set(alreadyRequestedSrc).add(childCompositeResource.src),\n entityMapping: entityMapping?.type === EntityMappingMode.EMM_NEXT_AVAILABLE ? entityMapping : undefined\n });\n }\n }\n }\n // ## 3 ##\n // Then, we copy the all rest of the components (skipping the Composite ones)\n for (const component of compositeResource.composite.components) {\n // We already instanced the composite\n if (component.name === CompositeRootComponent.componentName)\n continue;\n // ## 3a ##\n // We find the component definition\n const componentDefinition = getComponentDefinition(engine, component);\n // ## 3b ##\n // Iterating over all the entities with this component and create the replica\n for (const [entity, compositeComponentValue] of component.data) {\n const componentValueDeserialized = getComponentValue(componentDefinition, compositeComponentValue);\n const targetEntity = getCompositeEntity(entity);\n const componentValue = componentDefinition.create(targetEntity, componentValueDeserialized);\n // ## 3c ##\n // All entities referenced in the composite probably has a different resolved EntityNumber\n // We'll know with the mappedEntityes\n if (componentDefinition.componentId === TransformComponentNumber) {\n const transform = componentValue;\n if (transform.parent) {\n transform.parent = getCompositeEntity(transform.parent);\n }\n else {\n transform.parent = getCompositeEntity(0);\n }\n // TODO: is it going to be necessary to remap assets? e.g. src param from AudioSource and GltfContainer\n }\n else {\n Schemas.mutateNestedValues(componentDefinition.schema.jsonSchema, componentValue, (value, valueType) => {\n if (valueType.serializationType === 'entity') {\n return { changed: true, value: getCompositeEntity(value) };\n }\n else {\n return { changed: false };\n }\n });\n }\n }\n }\n const composite = CompositeRootComponent.getMutableOrNull(compositeRootEntity) || CompositeRootComponent.create(compositeRootEntity);\n for (const [entitySource, targetEntity] of mappedEntities) {\n composite.entities.push({\n src: entitySource,\n dest: targetEntity\n });\n }\n composite.src = compositeResource.src;\n return compositeRootEntity;\n}\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nimport { Value } from \"./google/protobuf/struct.gen\";\nconst protobufPackageSarasa = \"\";\nfunction createBaseComponentData() {\n return { data: undefined };\n}\n/**\n * @public\n */\nexport var ComponentData;\n(function (ComponentData) {\n function encode(message, writer = _m0.Writer.create()) {\n switch (message.data?.$case) {\n case \"json\":\n Value.encode(Value.wrap(message.data.json), writer.uint32(10).fork()).ldelim();\n break;\n case \"binary\":\n writer.uint32(18).bytes(message.data.binary);\n break;\n }\n return writer;\n }\n ComponentData.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseComponentData();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.data = { $case: \"json\", json: Value.unwrap(Value.decode(reader, reader.uint32())) };\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.data = { $case: \"binary\", binary: reader.bytes() };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n ComponentData.decode = decode;\n function fromJSON(object) {\n return {\n data: isSet(object.json)\n ? { $case: \"json\", json: object.json }\n : isSet(object.binary)\n ? { $case: \"binary\", binary: bytesFromBase64(object.binary) }\n : undefined,\n };\n }\n ComponentData.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.data?.$case === \"json\" && (obj.json = message.data?.json);\n message.data?.$case === \"binary\" &&\n (obj.binary = message.data?.binary !== undefined ? base64FromBytes(message.data?.binary) : undefined);\n return obj;\n }\n ComponentData.toJSON = toJSON;\n})(ComponentData || (ComponentData = {}));\nfunction createBaseCompositeComponent() {\n return { name: \"\", jsonSchema: undefined, data: new Map() };\n}\n/**\n * @public\n */\nexport var CompositeComponent;\n(function (CompositeComponent) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.name !== \"\") {\n writer.uint32(10).string(message.name);\n }\n if (message.jsonSchema !== undefined) {\n Value.encode(Value.wrap(message.jsonSchema), writer.uint32(18).fork()).ldelim();\n }\n (message.data).forEach((value, key) => {\n CompositeComponent_DataEntry.encode({ key: key, value }, writer.uint32(26).fork()).ldelim();\n });\n return writer;\n }\n CompositeComponent.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCompositeComponent();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.name = reader.string();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.jsonSchema = Value.unwrap(Value.decode(reader, reader.uint32()));\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n const entry3 = CompositeComponent_DataEntry.decode(reader, reader.uint32());\n if (entry3.value !== undefined) {\n message.data.set(entry3.key, entry3.value);\n }\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n CompositeComponent.decode = decode;\n function fromJSON(object) {\n return {\n name: isSet(object.name) ? String(object.name) : \"\",\n jsonSchema: isSet(object?.jsonSchema) ? object.jsonSchema : undefined,\n data: isObject(object.data)\n ? Object.entries(object.data).reduce((acc, [key, value]) => {\n acc.set(Number(key), ComponentData.fromJSON(value));\n return acc;\n }, new Map())\n : new Map(),\n };\n }\n CompositeComponent.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.name !== undefined && (obj.name = message.name);\n message.jsonSchema !== undefined && (obj.jsonSchema = message.jsonSchema);\n obj.data = {};\n if (message.data) {\n message.data.forEach((v, k) => {\n obj.data[k] = ComponentData.toJSON(v);\n });\n }\n return obj;\n }\n CompositeComponent.toJSON = toJSON;\n})(CompositeComponent || (CompositeComponent = {}));\nfunction createBaseCompositeComponent_DataEntry() {\n return { key: 0, value: undefined };\n}\n/**\n * @public\n */\nexport var CompositeComponent_DataEntry;\n(function (CompositeComponent_DataEntry) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.key !== 0) {\n writer.uint32(8).int32(message.key);\n }\n if (message.value !== undefined) {\n ComponentData.encode(message.value, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n CompositeComponent_DataEntry.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCompositeComponent_DataEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.key = reader.int32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.value = ComponentData.decode(reader, reader.uint32());\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n CompositeComponent_DataEntry.decode = decode;\n function fromJSON(object) {\n return {\n key: isSet(object.key) ? Number(object.key) : 0,\n value: isSet(object.value) ? ComponentData.fromJSON(object.value) : undefined,\n };\n }\n CompositeComponent_DataEntry.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.key !== undefined && (obj.key = Math.round(message.key));\n message.value !== undefined && (obj.value = message.value ? ComponentData.toJSON(message.value) : undefined);\n return obj;\n }\n CompositeComponent_DataEntry.toJSON = toJSON;\n})(CompositeComponent_DataEntry || (CompositeComponent_DataEntry = {}));\nfunction createBaseCompositeDefinition() {\n return { version: 0, components: [] };\n}\n/**\n * @public\n */\nexport var CompositeDefinition;\n(function (CompositeDefinition) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.version !== 0) {\n writer.uint32(8).int32(message.version);\n }\n for (const v of message.components) {\n CompositeComponent.encode(v, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n CompositeDefinition.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseCompositeDefinition();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.version = reader.int32();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.components.push(CompositeComponent.decode(reader, reader.uint32()));\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n CompositeDefinition.decode = decode;\n function fromJSON(object) {\n return {\n version: isSet(object.version) ? Number(object.version) : 0,\n components: Array.isArray(object?.components)\n ? object.components.map((e) => CompositeComponent.fromJSON(e))\n : [],\n };\n }\n CompositeDefinition.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.version !== undefined && (obj.version = Math.round(message.version));\n if (message.components) {\n obj.components = message.components.map((e) => e ? CompositeComponent.toJSON(e) : undefined);\n }\n else {\n obj.components = [];\n }\n return obj;\n }\n CompositeDefinition.toJSON = toJSON;\n})(CompositeDefinition || (CompositeDefinition = {}));\nconst tsProtoGlobalThis = (() => {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw \"Unable to locate global object\";\n})();\nfunction bytesFromBase64(b64) {\n if (tsProtoGlobalThis.Buffer) {\n return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, \"base64\"));\n }\n else {\n const bin = tsProtoGlobalThis.atob(b64);\n const arr = new Uint8Array(bin.length);\n for (let i = 0; i < bin.length; ++i) {\n arr[i] = bin.charCodeAt(i);\n }\n return arr;\n }\n}\nfunction base64FromBytes(arr) {\n if (tsProtoGlobalThis.Buffer) {\n return tsProtoGlobalThis.Buffer.from(arr).toString(\"base64\");\n }\n else {\n const bin = [];\n arr.forEach((byte) => {\n bin.push(String.fromCharCode(byte));\n });\n return tsProtoGlobalThis.btoa(bin.join(\"\"));\n }\n}\nfunction isObject(value) {\n return typeof value === \"object\" && value !== null;\n}\nfunction isSet(value) {\n return value !== null && value !== undefined;\n}\n", "/* eslint-disable */\nimport _m0 from \"protobufjs/minimal\";\nconst protobufPackageSarasa = \"google.protobuf\";\n/**\n * `NullValue` is a singleton enumeration to represent the null value for the\n * `Value` type union.\n *\n * The JSON representation for `NullValue` is JSON `null`.\n */\n/**\n * @public\n */\nexport var NullValue;\n(function (NullValue) {\n /** NULL_VALUE - Null value. */\n NullValue[NullValue[\"NULL_VALUE\"] = 0] = \"NULL_VALUE\";\n})(NullValue || (NullValue = {}));\n/**\n * @public\n */\nexport function nullValueFromJSON(object) {\n switch (object) {\n case 0:\n case \"NULL_VALUE\":\n return 0 /* NullValue.NULL_VALUE */;\n default:\n throw new tsProtoGlobalThis.Error(\"Unrecognized enum value \" + object + \" for enum NullValue\");\n }\n}\n/**\n * @public\n */\nexport function nullValueToJSON(object) {\n switch (object) {\n case 0 /* NullValue.NULL_VALUE */:\n return \"NULL_VALUE\";\n default:\n throw new tsProtoGlobalThis.Error(\"Unrecognized enum value \" + object + \" for enum NullValue\");\n }\n}\nfunction createBaseStruct() {\n return { fields: new Map() };\n}\n/**\n * @public\n */\nexport var Struct;\n(function (Struct) {\n function encode(message, writer = _m0.Writer.create()) {\n (message.fields).forEach((value, key) => {\n if (value !== undefined) {\n Struct_FieldsEntry.encode({ key: key, value }, writer.uint32(10).fork()).ldelim();\n }\n });\n return writer;\n }\n Struct.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseStruct();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32());\n if (entry1.value !== undefined) {\n message.fields.set(entry1.key, entry1.value);\n }\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Struct.decode = decode;\n function fromJSON(object) {\n return {\n fields: isObject(object.fields)\n ? Object.entries(object.fields).reduce((acc, [key, value]) => {\n acc.set(key, value);\n return acc;\n }, new Map())\n : new Map(),\n };\n }\n Struct.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n obj.fields = {};\n if (message.fields) {\n message.fields.forEach((v, k) => {\n obj.fields[k] = v;\n });\n }\n return obj;\n }\n Struct.toJSON = toJSON;\n function wrap(object) {\n const struct = createBaseStruct();\n if (object !== undefined) {\n Object.keys(object).forEach((key) => {\n struct.fields.set(key, object[key]);\n });\n }\n return struct;\n }\n Struct.wrap = wrap;\n function unwrap(message) {\n const object = {};\n [...message.fields.keys()].forEach((key) => {\n object[key] = message.fields.get(key);\n });\n return object;\n }\n Struct.unwrap = unwrap;\n})(Struct || (Struct = {}));\nfunction createBaseStruct_FieldsEntry() {\n return { key: \"\", value: undefined };\n}\n/**\n * @public\n */\nexport var Struct_FieldsEntry;\n(function (Struct_FieldsEntry) {\n function encode(message, writer = _m0.Writer.create()) {\n if (message.key !== \"\") {\n writer.uint32(10).string(message.key);\n }\n if (message.value !== undefined) {\n Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim();\n }\n return writer;\n }\n Struct_FieldsEntry.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseStruct_FieldsEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.key = reader.string();\n continue;\n case 2:\n if (tag !== 18) {\n break;\n }\n message.value = Value.unwrap(Value.decode(reader, reader.uint32()));\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Struct_FieldsEntry.decode = decode;\n function fromJSON(object) {\n return { key: isSet(object.key) ? String(object.key) : \"\", value: isSet(object?.value) ? object.value : undefined };\n }\n Struct_FieldsEntry.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.key !== undefined && (obj.key = message.key);\n message.value !== undefined && (obj.value = message.value);\n return obj;\n }\n Struct_FieldsEntry.toJSON = toJSON;\n})(Struct_FieldsEntry || (Struct_FieldsEntry = {}));\nfunction createBaseValue() {\n return { kind: undefined };\n}\n/**\n * @public\n */\nexport var Value;\n(function (Value) {\n function encode(message, writer = _m0.Writer.create()) {\n switch (message.kind?.$case) {\n case \"nullValue\":\n writer.uint32(8).int32(message.kind.nullValue);\n break;\n case \"numberValue\":\n writer.uint32(17).double(message.kind.numberValue);\n break;\n case \"stringValue\":\n writer.uint32(26).string(message.kind.stringValue);\n break;\n case \"boolValue\":\n writer.uint32(32).bool(message.kind.boolValue);\n break;\n case \"structValue\":\n Struct.encode(Struct.wrap(message.kind.structValue), writer.uint32(42).fork()).ldelim();\n break;\n case \"listValue\":\n ListValue.encode(ListValue.wrap(message.kind.listValue), writer.uint32(50).fork()).ldelim();\n break;\n }\n return writer;\n }\n Value.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseValue();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 8) {\n break;\n }\n message.kind = { $case: \"nullValue\", nullValue: reader.int32() };\n continue;\n case 2:\n if (tag !== 17) {\n break;\n }\n message.kind = { $case: \"numberValue\", numberValue: reader.double() };\n continue;\n case 3:\n if (tag !== 26) {\n break;\n }\n message.kind = { $case: \"stringValue\", stringValue: reader.string() };\n continue;\n case 4:\n if (tag !== 32) {\n break;\n }\n message.kind = { $case: \"boolValue\", boolValue: reader.bool() };\n continue;\n case 5:\n if (tag !== 42) {\n break;\n }\n message.kind = { $case: \"structValue\", structValue: Struct.unwrap(Struct.decode(reader, reader.uint32())) };\n continue;\n case 6:\n if (tag !== 50) {\n break;\n }\n message.kind = { $case: \"listValue\", listValue: ListValue.unwrap(ListValue.decode(reader, reader.uint32())) };\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n Value.decode = decode;\n function fromJSON(object) {\n return {\n kind: isSet(object.nullValue)\n ? { $case: \"nullValue\", nullValue: nullValueFromJSON(object.nullValue) }\n : isSet(object.numberValue)\n ? { $case: \"numberValue\", numberValue: Number(object.numberValue) }\n : isSet(object.stringValue)\n ? { $case: \"stringValue\", stringValue: String(object.stringValue) }\n : isSet(object.boolValue)\n ? { $case: \"boolValue\", boolValue: Boolean(object.boolValue) }\n : isSet(object.structValue)\n ? { $case: \"structValue\", structValue: object.structValue }\n : isSet(object.listValue)\n ? { $case: \"listValue\", listValue: [...object.listValue] }\n : undefined,\n };\n }\n Value.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n message.kind?.$case === \"nullValue\" &&\n (obj.nullValue = message.kind?.nullValue !== undefined ? nullValueToJSON(message.kind?.nullValue) : undefined);\n message.kind?.$case === \"numberValue\" && (obj.numberValue = message.kind?.numberValue);\n message.kind?.$case === \"stringValue\" && (obj.stringValue = message.kind?.stringValue);\n message.kind?.$case === \"boolValue\" && (obj.boolValue = message.kind?.boolValue);\n message.kind?.$case === \"structValue\" && (obj.structValue = message.kind?.structValue);\n message.kind?.$case === \"listValue\" && (obj.listValue = message.kind?.listValue);\n return obj;\n }\n Value.toJSON = toJSON;\n function wrap(value) {\n const result = createBaseValue();\n if (value === null) {\n result.kind = { $case: \"nullValue\", nullValue: 0 /* NullValue.NULL_VALUE */ };\n }\n else if (typeof value === \"boolean\") {\n result.kind = { $case: \"boolValue\", boolValue: value };\n }\n else if (typeof value === \"number\") {\n result.kind = { $case: \"numberValue\", numberValue: value };\n }\n else if (typeof value === \"string\") {\n result.kind = { $case: \"stringValue\", stringValue: value };\n }\n else if (Array.isArray(value)) {\n result.kind = { $case: \"listValue\", listValue: value };\n }\n else if (typeof value === \"object\") {\n result.kind = { $case: \"structValue\", structValue: value };\n }\n else if (typeof value !== \"undefined\") {\n throw new Error(\"Unsupported any value type: \" + typeof value);\n }\n return result;\n }\n Value.wrap = wrap;\n function unwrap(message) {\n if (message.kind?.$case === \"nullValue\") {\n return null;\n }\n else if (message.kind?.$case === \"numberValue\") {\n return message.kind?.numberValue;\n }\n else if (message.kind?.$case === \"stringValue\") {\n return message.kind?.stringValue;\n }\n else if (message.kind?.$case === \"boolValue\") {\n return message.kind?.boolValue;\n }\n else if (message.kind?.$case === \"structValue\") {\n return message.kind?.structValue;\n }\n else if (message.kind?.$case === \"listValue\") {\n return message.kind?.listValue;\n }\n else {\n return undefined;\n }\n }\n Value.unwrap = unwrap;\n})(Value || (Value = {}));\nfunction createBaseListValue() {\n return { values: [] };\n}\n/**\n * @public\n */\nexport var ListValue;\n(function (ListValue) {\n function encode(message, writer = _m0.Writer.create()) {\n for (const v of message.values) {\n Value.encode(Value.wrap(v), writer.uint32(10).fork()).ldelim();\n }\n return writer;\n }\n ListValue.encode = encode;\n function decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseListValue();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag !== 10) {\n break;\n }\n message.values.push(Value.unwrap(Value.decode(reader, reader.uint32())));\n continue;\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n }\n ListValue.decode = decode;\n function fromJSON(object) {\n return { values: Array.isArray(object?.values) ? [...object.values] : [] };\n }\n ListValue.fromJSON = fromJSON;\n function toJSON(message) {\n const obj = {};\n if (message.values) {\n obj.values = message.values.map((e) => e);\n }\n else {\n obj.values = [];\n }\n return obj;\n }\n ListValue.toJSON = toJSON;\n function wrap(array) {\n const result = createBaseListValue();\n result.values = array ?? [];\n return result;\n }\n ListValue.wrap = wrap;\n function unwrap(message) {\n if (message?.hasOwnProperty(\"values\") && Array.isArray(message.values)) {\n return message.values;\n }\n else {\n return message;\n }\n }\n ListValue.unwrap = unwrap;\n})(ListValue || (ListValue = {}));\nconst tsProtoGlobalThis = (() => {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw \"Unable to locate global object\";\n})();\nfunction isObject(value) {\n return typeof value === \"object\" && value !== null;\n}\nfunction isSet(value) {\n return value !== null && value !== undefined;\n}\n", "import { getCompositeRootComponent } from './components';\nimport { EntityMappingMode, instanceComposite } from './instance';\nimport { resolveComposite } from './path';\nimport { CompositeDefinition } from './proto/gen/composite.gen';\nexport { EntityMappingMode };\nexport { getCompositeRootComponent };\n/**\n * @public\n * @deprecated composite is not being supported so far, please do not use this feature\n */\nexport var Composite;\n(function (Composite) {\n /** @public */\n function fromJson(object) {\n return CompositeDefinition.fromJSON(object);\n }\n Composite.fromJson = fromJson;\n /** @public */\n function fromBinary(buffer) {\n return CompositeDefinition.decode(buffer);\n }\n Composite.fromBinary = fromBinary;\n /** @public */\n function toJson(composite) {\n return CompositeDefinition.toJSON(composite);\n }\n Composite.toJson = toJson;\n /** @public */\n function toBinary(composite) {\n return CompositeDefinition.encode(composite).finish();\n }\n Composite.toBinary = toBinary;\n /**\n * Instance a composite and returns its root entity\n * @param compositeData - state serialized by the CRDT protocol\n * @param getNextAvailableEntity - function that gives unused entities\n * @param rootEntity - (optional) suggested mapped rootEntity for the composite\n *\n * @public\n */\n /*#__PURE__*/ function instance(engine, compositeData, compositeProvider, options = {}) {\n instanceComposite(engine, compositeData, compositeProvider, options);\n }\n Composite.instance = instance;\n /**\n * Resolve and normalize a composite path\n * @param src - the source path\n * @param cwd - the directory from the resolve should start to resolve\n *\n * @returns the absolute resolved path without slash at the beginning\n * @public\n */\n /*#__PURE__*/ function resolveAndNormalizePath(src, cwd = '/') {\n return resolveComposite(src, cwd);\n }\n Composite.resolveAndNormalizePath = resolveAndNormalizePath;\n})(Composite || (Composite = {}));\n", "// The order of the following imports matters. Please do not auto-sort\nexport * from './engine';\nexport * from './schemas';\nexport * from './runtime/initialization';\nexport * from './runtime/types';\nexport * from './runtime/helpers';\nexport { cyclicParentingChecker } from './systems/cyclicParentingChecker';\nexport * from './systems/events';\nexport * from './systems/raycast';\nexport * from './systems/videoEvents';\nexport * from './systems/async-task';\nexport * from './engine/entity';\nexport * from './components/types';\n// @internal\nimport * as components from './components';\n// @internal\nexport { components };\nimport { engine } from './runtime/initialization';\n// export components for global engine\nexport const Transform = /* @__PURE__*/ components.Transform(engine);\nexport const Animator = /* @__PURE__*/ components.Animator(engine);\nexport const Material = /* @__PURE__*/ components.Material(engine);\nexport const MeshRenderer = /* @__PURE__*/ components.MeshRenderer(engine);\nexport const MeshCollider = /* @__PURE__*/ components.MeshCollider(engine);\nexport const Name = components.Name(engine);\nexport const Tween = /* @__PURE__*/ components.Tween(engine);\n/**\n * @alpha\n * This is going to be used for sync components through a server.\n * Can be modified in the future since it's still in research\n */\nexport const SyncComponents = /* @__PURE__*/ components.SyncComponents(engine);\n/**\n * @alpha\n * Tag a entity to be syncronized through comms\n */\nexport const NetworkEntity = /* @__PURE__*/ components.NetworkEntity(engine);\n/**\n * @alpha\n * Tag a entity to be syncronized through comms\n */\nexport const NetworkParent = /* @__PURE__*/ components.NetworkParent(engine);\n// export components for global engine\nexport * from './components/generated/global.gen';\nexport * from './components/generated/types.gen';\nexport * from './serialization/crdt';\nexport * from './composite';\n", "/**\n * Constant used to convert a value to gamma space\n * @public\n */\nexport const ToGammaSpace = 1 / 2.2;\n/**\n * Constant used to convert a value to linear space\n * @public\n */\nexport const ToLinearSpace = 2.2;\n/**\n * Constant used to define the minimal number value in Babylon.js\n * @public\n */\nexport const Epsilon = 0.000001;\n/**\n * Constant used to convert from Euler degrees to radians\n * @public\n */\nexport const DEG2RAD = Math.PI / 180;\n/**\n * Constant used to convert from radians to Euler degrees\n * @public\n */\nexport const RAD2DEG = 360 / (Math.PI * 2);\n", "/**\n * Scalar computation library\n * @public\n */\nexport var Scalar;\n(function (Scalar) {\n /**\n * Two pi constants convenient for computation.\n */\n Scalar.TwoPi = Math.PI * 2;\n /**\n * Boolean : true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)\n * @param a - number\n * @param b - number\n * @param epsilon - (default = 1.401298E-45)\n * @returns true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)\n */\n function withinEpsilon(a, b, epsilon = 1.401298e-45) {\n const num = a - b;\n return -epsilon <= num && num <= epsilon;\n }\n Scalar.withinEpsilon = withinEpsilon;\n /**\n * Returns a string : the upper case translation of the number i to hexadecimal.\n * @param i - number\n * @returns the upper case translation of the number i to hexadecimal.\n */\n function toHex(i) {\n const str = i.toString(16);\n if (i <= 15) {\n return ('0' + str).toUpperCase();\n }\n return str.toUpperCase();\n }\n Scalar.toHex = toHex;\n /**\n * Returns -1 if value is negative and +1 is value is positive.\n * @param _value - the value\n * @returns the value itself if it's equal to zero.\n */\n function sign(value) {\n const _value = +value; // convert to a number\n if (_value === 0 || isNaN(_value)) {\n return _value;\n }\n return _value > 0 ? 1 : -1;\n }\n Scalar.sign = sign;\n /**\n * Returns the value itself if it's between min and max.\n * Returns min if the value is lower than min.\n * Returns max if the value is greater than max.\n * @param value - the value to clmap\n * @param min - the min value to clamp to (default: 0)\n * @param max - the max value to clamp to (default: 1)\n * @returns the clamped value\n */\n function clamp(value, min = 0, max = 1) {\n return Math.min(max, Math.max(min, value));\n }\n Scalar.clamp = clamp;\n /**\n * the log2 of value.\n * @param value - the value to compute log2 of\n * @returns the log2 of value.\n */\n function log2(value) {\n return Math.log(value) * Math.LOG2E;\n }\n Scalar.log2 = log2;\n /**\n * Loops the value, so that it is never larger than length and never smaller than 0.\n *\n * This is similar to the modulo operator but it works with floating point numbers.\n * For example, using 3.0 for t and 2.5 for length, the result would be 0.5.\n * With t = 5 and length = 2.5, the result would be 0.0.\n * Note, however, that the behaviour is not defined for negative numbers as it is for the modulo operator\n * @param value - the value\n * @param length - the length\n * @returns the looped value\n */\n function repeat(value, length) {\n return value - Math.floor(value / length) * length;\n }\n Scalar.repeat = repeat;\n /**\n * Normalize the value between 0.0 and 1.0 using min and max values\n * @param value - value to normalize\n * @param min - max to normalize between\n * @param max - min to normalize between\n * @returns the normalized value\n */\n function normalize(value, min, max) {\n return (value - min) / (max - min);\n }\n Scalar.normalize = normalize;\n /**\n * Denormalize the value from 0.0 and 1.0 using min and max values\n * @param normalized - value to denormalize\n * @param min - max to denormalize between\n * @param max - min to denormalize between\n * @returns the denormalized value\n */\n function denormalize(normalized, min, max) {\n return normalized * (max - min) + min;\n }\n Scalar.denormalize = denormalize;\n /**\n * Calculates the shortest difference between two given angles given in degrees.\n * @param current - current angle in degrees\n * @param target - target angle in degrees\n * @returns the delta\n */\n function deltaAngle(current, target) {\n let num = repeat(target - current, 360.0);\n if (num > 180.0) {\n num -= 360.0;\n }\n return num;\n }\n Scalar.deltaAngle = deltaAngle;\n /**\n * PingPongs the value t, so that it is never larger than length and never smaller than 0.\n * @param tx - value\n * @param length - length\n * @returns The returned value will move back and forth between 0 and length\n */\n function pingPong(tx, length) {\n const t = repeat(tx, length * 2.0);\n return length - Math.abs(t - length);\n }\n Scalar.pingPong = pingPong;\n /**\n * Interpolates between min and max with smoothing at the limits.\n *\n * This export function interpolates between min and max in a similar way to Lerp. However, the interpolation will gradually speed up\n * from the start and slow down toward the end. This is useful for creating natural-looking animation, fading and other transitions.\n * @param from - from\n * @param to - to\n * @param tx - value\n * @returns the smooth stepped value\n */\n function smoothStep(from, to, tx) {\n let t = clamp(tx);\n t = -2.0 * t * t * t + 3.0 * t * t;\n return to * t + from * (1.0 - t);\n }\n Scalar.smoothStep = smoothStep;\n /**\n * Moves a value current towards target.\n *\n * This is essentially the same as Mathf.Lerp but instead the export function will ensure that the speed never exceeds maxDelta.\n * Negative values of maxDelta pushes the value away from target.\n * @param current - current value\n * @param target - target value\n * @param maxDelta - max distance to move\n * @returns resulting value\n */\n function moveTowards(current, target, maxDelta) {\n let result = 0;\n if (Math.abs(target - current) <= maxDelta) {\n result = target;\n }\n else {\n result = current + sign(target - current) * maxDelta;\n }\n return result;\n }\n Scalar.moveTowards = moveTowards;\n /**\n * Same as MoveTowards but makes sure the values interpolate correctly when they wrap around 360 degrees.\n *\n * Variables current and target are assumed to be in degrees. For optimization reasons, negative values of maxDelta\n * are not supported and may cause oscillation. To push current away from a target angle, add 180 to that angle instead.\n * @param current - current value\n * @param target - target value\n * @param maxDelta - max distance to move\n * @returns resulting angle\n */\n function moveTowardsAngle(current, target, maxDelta) {\n const num = deltaAngle(current, target);\n let result = 0;\n if (-maxDelta < num && num < maxDelta) {\n result = target;\n }\n else {\n result = moveTowards(current, current + num, maxDelta);\n }\n return result;\n }\n Scalar.moveTowardsAngle = moveTowardsAngle;\n /**\n * Creates a new scalar with values linearly interpolated of \"amount\" between the start scalar and the end scalar\n * @param start - start value\n * @param end - target value\n * @param amount - amount to lerp between\n * @returns the lerped value\n */\n function lerp(start, end, amount) {\n return start + (end - start) * amount;\n }\n Scalar.lerp = lerp;\n /**\n * Same as Lerp but makes sure the values interpolate correctly when they wrap around 360 degrees.\n * The parameter t is clamped to the range [0, 1]. Variables a and b are assumed to be in degrees.\n * @param start - start value\n * @param end - target value\n * @param amount - amount to lerp between\n * @returns the lerped value\n */\n function lerpAngle(start, end, amount) {\n let num = repeat(end - start, 360.0);\n if (num > 180.0) {\n num -= 360.0;\n }\n return start + num * clamp(amount);\n }\n Scalar.lerpAngle = lerpAngle;\n /**\n * Calculates the linear parameter t that produces the interpolant value within the range [a, b].\n * @param a - start value\n * @param b - target value\n * @param value - value between a and b\n * @returns the inverseLerp value\n */\n function inverseLerp(a, b, value) {\n let result = 0;\n if (a !== b) {\n result = clamp((value - a) / (b - a));\n }\n else {\n result = 0.0;\n }\n return result;\n }\n Scalar.inverseLerp = inverseLerp;\n /**\n * Returns a new scalar located for \"amount\" (float) on the Hermite spline defined by the scalars \"value1\", \"value3\", \"tangent1\", \"tangent2\".\n * {@link http://mathworld.wolfram.com/HermitePolynomial.html}\n * @param value1 - spline value\n * @param tangent1 - spline value\n * @param value2 - spline value\n * @param tangent2 - spline value\n * @param amount - input value\n * @returns hermite result\n */\n function hermite(value1, tangent1, value2, tangent2, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\n const part2 = -2.0 * cubed + 3.0 * squared;\n const part3 = cubed - 2.0 * squared + amount;\n const part4 = cubed - squared;\n return value1 * part1 + value2 * part2 + tangent1 * part3 + tangent2 * part4;\n }\n Scalar.hermite = hermite;\n /**\n * Returns a random float number between and min and max values\n * @param min - min value of random\n * @param max - max value of random\n * @returns random value\n */\n function randomRange(min, max) {\n if (min === max) {\n return min;\n }\n return Math.random() * (max - min) + min;\n }\n Scalar.randomRange = randomRange;\n /**\n * This export function returns percentage of a number in a given range.\n *\n * RangeToPercent(40,20,60) will return 0.5 (50%)\n * RangeToPercent(34,0,100) will return 0.34 (34%)\n * @param num - to convert to percentage\n * @param min - min range\n * @param max - max range\n * @returns the percentage\n */\n function rangeToPercent(num, min, max) {\n return (num - min) / (max - min);\n }\n Scalar.rangeToPercent = rangeToPercent;\n /**\n * This export function returns number that corresponds to the percentage in a given range.\n *\n * PercentToRange(0.34,0,100) will return 34.\n * @param percent - to convert to number\n * @param min - min range\n * @param max - max range\n * @returns the number\n */\n function percentToRange(percent, min, max) {\n return (max - min) * percent + min;\n }\n Scalar.percentToRange = percentToRange;\n /**\n * Returns the angle converted to equivalent value between -Math.PI and Math.PI radians.\n * @param angle - The angle to normalize in radian.\n * @returns The converted angle.\n */\n function normalizeRadians(angle) {\n // More precise but slower version kept for reference.\n // tslint:disable:no-commented-out-code\n /*\n // angle = angle % Tools.TwoPi;\n // angle = (angle + Tools.TwoPi) % Tools.TwoPi;\n \n //if (angle > Math.PI) {\n //\tangle -= Tools.TwoPi;\n //}\n */\n return angle - Scalar.TwoPi * Math.floor((angle + Math.PI) / Scalar.TwoPi);\n }\n Scalar.normalizeRadians = normalizeRadians;\n})(Scalar || (Scalar = {}));\n", "import { Epsilon } from './types';\nimport { Quaternion } from './Quaternion';\nimport { Scalar } from './Scalar';\n/**\n * @public\n * Vector3 is a type and a namespace.\n * ```\n * // The namespace contains all types and functions to operates with Vector3\n * const next = Vector3.add(pointA, velocityA)\n * // The type Vector3 is an alias to Vector3.ReadonlyVector3\n * const readonlyPosition: Vector3 = Vector3.Zero()\n * readonlyPosition.x = 0.1 // this FAILS\n *\n * // For mutable usage, use `Vector3.Mutable`\n * const position: Vector3.Mutable = Vector3.One()\n * position.x = 3.0 // this WORKS\n * ```\n */\nexport var Vector3;\n(function (Vector3) {\n /**\n * Gets a boolean indicating that the vector is non uniform meaning x, y or z are not all the same\n * @param vector - vector to check\n */\n function isNonUniform(vector) {\n const absX = Math.abs(vector.x);\n const absY = Math.abs(vector.y);\n if (absX !== absY) {\n return true;\n }\n const absZ = Math.abs(vector.z);\n if (absX !== absZ) {\n return true;\n }\n return false;\n }\n Vector3.isNonUniform = isNonUniform;\n /**\n * Creates a new Vector3 object from the given x, y, z (floats) coordinates.\n * @param x - defines the first coordinates (on X axis)\n * @param y - defines the second coordinates (on Y axis)\n * @param z - defines the third coordinates (on Z axis)\n */\n function create(\n /**\n * Defines the first coordinates (on X axis)\n */\n x = 0, \n /**\n * Defines the second coordinates (on Y axis)\n */\n y = 0, \n /**\n * Defines the third coordinates (on Z axis)\n */\n z = 0) {\n return { x, y, z };\n }\n Vector3.create = create;\n /**\n * Returns a new Vector3 as the result of the addition of the two given vectors.\n * @param vector1 - the first vector\n * @param vector2 - the second vector\n * @returns the resulting vector\n */\n function add(vector1, vector2) {\n return {\n x: vector1.x + vector2.x,\n y: vector1.y + vector2.y,\n z: vector1.z + vector2.z\n };\n }\n Vector3.add = add;\n /**\n * Add component by component the vector2 into dest\n * @param dest - the first vector and destination of addition\n * @param vector2 - the second vector\n */\n function addToRef(vector1, vector2, result) {\n result.x = vector1.x + vector2.x;\n result.y = vector1.y + vector2.y;\n result.z = vector1.z + vector2.z;\n }\n Vector3.addToRef = addToRef;\n /**\n * Returns a new Vector3 as the result of the substraction of the two given vectors.\n * @returns the resulting vector\n */\n function subtract(vector1, vector2) {\n return {\n x: vector1.x - vector2.x,\n y: vector1.y - vector2.y,\n z: vector1.z - vector2.z\n };\n }\n Vector3.subtract = subtract;\n /**\n * Returns a new Vector3 as the result of the substraction of the two given vectors.\n * @returns the resulting vector\n */\n function subtractToRef(vector1, vector2, result) {\n result.x = vector1.x - vector2.x;\n result.y = vector1.y - vector2.y;\n result.z = vector1.z - vector2.z;\n }\n Vector3.subtractToRef = subtractToRef;\n /**\n * Subtracts the given floats from the current Vector3 coordinates and set the given vector \"result\" with this result\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @param result - defines the Vector3 object where to store the result\n */\n function subtractFromFloatsToRef(vector1, x, y, z, result) {\n result.x = vector1.x - x;\n result.y = vector1.y - y;\n result.z = vector1.z - z;\n }\n Vector3.subtractFromFloatsToRef = subtractFromFloatsToRef;\n /**\n * Returns a new Vector3 with the other sign\n * @returns the resulting vector\n */\n function negate(value) {\n return { x: -value.x, y: -value.y, z: -value.z };\n }\n Vector3.negate = negate;\n /**\n * Copy source into dest\n *\n */\n function copyFrom(source, dest) {\n dest.x = source.x;\n dest.y = source.y;\n dest.z = source.z;\n }\n Vector3.copyFrom = copyFrom;\n /**\n * Sets the given vector \"dest\" with the given floats.\n * @param x - defines the x coordinate of the source\n * @param y - defines the y coordinate of the source\n * @param z - defines the z coordinate of the source\n * @param dest - defines the Vector3 where to store the result\n */\n function copyFromFloats(x, y, z, dest) {\n dest.x = x;\n dest.y = y;\n dest.z = z;\n }\n Vector3.copyFromFloats = copyFromFloats;\n /**\n * Returns a new Vector3 with the same value\n * @returns the resulting vector\n */\n function clone(source) {\n return create(source.x, source.y, source.z);\n }\n Vector3.clone = clone;\n /**\n * Get the clip factor between two vectors\n * @param vector0 - defines the first operand\n * @param vector1 - defines the second operand\n * @param axis - defines the axis to use\n * @param size - defines the size along the axis\n * @returns the clip factor\n */\n function getClipFactor(vector0, vector1, axis, size) {\n const d0 = dot(vector0, axis) - size;\n const d1 = dot(vector1, axis) - size;\n const s = d0 / (d0 - d1);\n return s;\n }\n Vector3.getClipFactor = getClipFactor;\n /**\n * Get angle between two vectors\n * @param vector0 - angle between vector0 and vector1\n * @param vector1 - angle between vector0 and vector1\n * @param normal - direction of the normal\n * @returns the angle between vector0 and vector1\n */\n function getAngleBetweenVectors(vector0, vector1, normal) {\n const v0 = normalize(vector0);\n const v1 = normalize(vector1);\n const v0v1dot = dot(v0, v1);\n const n = create();\n crossToRef(v0, v1, n);\n if (dot(n, normal) > 0) {\n return Math.acos(v0v1dot);\n }\n return -Math.acos(v0v1dot);\n }\n Vector3.getAngleBetweenVectors = getAngleBetweenVectors;\n /**\n * Returns a new Vector3 set from the index \"offset\" of the given array\n * @param array - defines the source array\n * @param offset - defines the offset in the source array\n * @returns the new Vector3\n */\n function fromArray(array, offset = 0) {\n return create(array[offset], array[offset + 1], array[offset + 2]);\n }\n Vector3.fromArray = fromArray;\n /**\n * Returns a new Vector3 set from the index \"offset\" of the given FloatArray\n * This function is deprecated. Use FromArray instead\n * @param array - defines the source array\n * @param offset - defines the offset in the source array\n * @returns the new Vector3\n */\n function fromFloatArray(array, offset) {\n return fromArray(array, offset);\n }\n Vector3.fromFloatArray = fromFloatArray;\n /**\n * Sets the given vector \"result\" with the element values from the index \"offset\" of the given array\n * @param array - defines the source array\n * @param offset - defines the offset in the source array\n * @param result - defines the Vector3 where to store the result\n */\n function fromArrayToRef(array, offset, result) {\n result.x = array[offset];\n result.y = array[offset + 1];\n result.z = array[offset + 2];\n }\n Vector3.fromArrayToRef = fromArrayToRef;\n /**\n * Sets the given vector \"result\" with the element values from the index \"offset\" of the given FloatArray\n * This function is deprecated. Use FromArrayToRef instead.\n * @param array - defines the source array\n * @param offset - defines the offset in the source array\n * @param result - defines the Vector3 where to store the result\n */\n function fromFloatArrayToRef(array, offset, result) {\n return fromArrayToRef(array, offset, result);\n }\n Vector3.fromFloatArrayToRef = fromFloatArrayToRef;\n // Properties\n /**\n * Gets the length of the Vector3\n * @returns the length of the Vector3\n */\n function length(vector) {\n return Math.sqrt(vector.x * vector.x + vector.y * vector.y + vector.z * vector.z);\n }\n Vector3.length = length;\n /**\n * Gets the squared length of the Vector3\n * @returns squared length of the Vector3\n */\n function lengthSquared(vector) {\n return vector.x * vector.x + vector.y * vector.y + vector.z * vector.z;\n }\n Vector3.lengthSquared = lengthSquared;\n /**\n * Returns a new Vector3 set with the current Vector3 coordinates multiplied by the float \"scale\"\n * @param scale - defines the multiplier factor\n * @returns a new Vector3\n */\n function scaleToRef(vector, scale, result) {\n result.x = vector.x * scale;\n result.y = vector.y * scale;\n result.z = vector.z * scale;\n }\n Vector3.scaleToRef = scaleToRef;\n /**\n * Returns a new Vector3 set with the current Vector3 coordinates multiplied by the float \"scale\"\n * @param scale - defines the multiplier factor\n * @returns a new Vector3\n */\n function scale(vector, scale) {\n return create(vector.x * scale, vector.y * scale, vector.z * scale);\n }\n Vector3.scale = scale;\n /**\n * Normalize the current Vector3 with the given input length.\n * Please note that this is an in place operation.\n * @param len - the length of the vector\n * @returns the current updated Vector3\n */\n function normalizeFromLength(vector, len) {\n const result = create(0, 0, 0);\n normalizeFromLengthToRef(vector, len, result);\n return result;\n }\n Vector3.normalizeFromLength = normalizeFromLength;\n /**\n * Normalize the current Vector3 with the given input length.\n * Please note that this is an in place operation.\n * @param len - the length of the vector\n * @returns the current updated Vector3\n */\n function normalizeFromLengthToRef(vector, len, result) {\n if (len === 0 || len === 1.0) {\n copyFrom(vector, result);\n return;\n }\n scaleToRef(vector, 1.0 / len, result);\n }\n Vector3.normalizeFromLengthToRef = normalizeFromLengthToRef;\n /**\n * Normalize the current Vector3.\n * Please note that this is an in place operation.\n * @returns the current updated Vector3\n */\n function normalize(vector) {\n return normalizeFromLength(vector, length(vector));\n }\n Vector3.normalize = normalize;\n /**\n * Normalize the current Vector3.\n * Please note that this is an in place operation.\n * @returns the current updated Vector3\n */\n function normalizeToRef(vector, result) {\n normalizeFromLengthToRef(vector, length(vector), result);\n }\n Vector3.normalizeToRef = normalizeToRef;\n /**\n * Returns the dot product (float) between the vectors \"left\" and \"right\"\n * @param left - defines the left operand\n * @param right - defines the right operand\n * @returns the dot product\n */\n function dot(left, right) {\n return left.x * right.x + left.y * right.y + left.z * right.z;\n }\n Vector3.dot = dot;\n /**\n * Multiplies this vector (with an implicit 1 in the 4th dimension) and m, and divides by perspective\n * @param matrix - The transformation matrix\n * @returns result Vector3\n */\n function applyMatrix4(vector, matrix) {\n const result = clone(vector);\n applyMatrix4ToRef(vector, matrix, result);\n return result;\n }\n Vector3.applyMatrix4 = applyMatrix4;\n /**\n * Multiplies this vector (with an implicit 1 in the 4th dimension) and m, and divides by perspective and set the given vector \"result\" with this result\n * @param matrix - The transformation matrix\n * @param result - defines the Vector3 object where to store the result\n */\n function applyMatrix4ToRef(vector, matrix, result) {\n const { x, y, z } = vector;\n const m = matrix._m;\n const w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\n result.x = (m[0] * x + m[4] * y + m[8] * z + m[12]) * w;\n result.y = (m[1] * x + m[5] * y + m[9] * z + m[13]) * w;\n result.z = (m[2] * x + m[6] * y + m[10] * z + m[14]) * w;\n }\n Vector3.applyMatrix4ToRef = applyMatrix4ToRef;\n /**\n * Rotates the current Vector3 based on the given quaternion\n * @param q - defines the Quaternion\n * @returns the current Vector3\n */\n function rotate(vector, q) {\n const result = create();\n rotateToRef(vector, q, result);\n return result;\n }\n Vector3.rotate = rotate;\n /**\n * Rotates current Vector3 based on the given quaternion, but applies the rotation to target Vector3.\n * @param q - defines the Quaternion\n * @param result - defines the target Vector3\n * @returns the current Vector3\n */\n function rotateToRef(vector, q, result) {\n const { x, y, z } = vector;\n const { x: qx, y: qy, z: qz, w: qw } = q;\n // calculate quat * vector\n const ix = qw * x + qy * z - qz * y;\n const iy = qw * y + qz * x - qx * z;\n const iz = qw * z + qx * y - qy * x;\n const iw = -qx * x - qy * y - qz * z;\n // calculate result * inverse quat\n result.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n result.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n result.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n }\n Vector3.rotateToRef = rotateToRef;\n /**\n * Returns a new Vector3 located for \"amount\" (float) on the linear interpolation between the vectors \"start\" and \"end\"\n * @param start - defines the start value\n * @param end - defines the end value\n * @param amount - max defines amount between both (between 0 and 1)\n * @returns the new Vector3\n */\n function lerp(start, end, amount) {\n const result = create(0, 0, 0);\n lerpToRef(start, end, amount, result);\n return result;\n }\n Vector3.lerp = lerp;\n /**\n * Sets the given vector \"result\" with the result of the linear interpolation from the vector \"start\" for \"amount\" to the vector \"end\"\n * @param start - defines the start value\n * @param end - defines the end value\n * @param amount - max defines amount between both (between 0 and 1)\n * @param result - defines the Vector3 where to store the result\n */\n function lerpToRef(start, end, amount, result) {\n result.x = start.x + (end.x - start.x) * amount;\n result.y = start.y + (end.y - start.y) * amount;\n result.z = start.z + (end.z - start.z) * amount;\n }\n Vector3.lerpToRef = lerpToRef;\n /**\n * Returns a new Vector3 as the cross product of the vectors \"left\" and \"right\"\n * The cross product is then orthogonal to both \"left\" and \"right\"\n * @param left - defines the left operand\n * @param right - defines the right operand\n * @returns the cross product\n */\n function cross(left, right) {\n const result = Zero();\n crossToRef(left, right, result);\n return result;\n }\n Vector3.cross = cross;\n /**\n * Sets the given vector \"result\" with the cross product of \"left\" and \"right\"\n * The cross product is then orthogonal to both \"left\" and \"right\"\n * @param left - defines the left operand\n * @param right - defines the right operand\n * @param result - defines the Vector3 where to store the result\n */\n function crossToRef(left, right, result) {\n result.x = left.y * right.z - left.z * right.y;\n result.y = left.z * right.x - left.x * right.z;\n result.z = left.x * right.y - left.y * right.x;\n }\n Vector3.crossToRef = crossToRef;\n /**\n * Returns a new Vector3 set with the result of the transformation by the given matrix of the given vector.\n * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\n * @param vector - defines the Vector3 to transform\n * @param transformation - defines the transformation matrix\n * @returns the transformed Vector3\n */\n function transformCoordinates(vector, transformation) {\n const result = Zero();\n transformCoordinatesToRef(vector, transformation, result);\n return result;\n }\n Vector3.transformCoordinates = transformCoordinates;\n /**\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given vector\n * This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)\n * @param vector - defines the Vector3 to transform\n * @param transformation - defines the transformation matrix\n * @param result - defines the Vector3 where to store the result\n */\n function transformCoordinatesToRef(vector, transformation, result) {\n return transformCoordinatesFromFloatsToRef(vector.x, vector.y, vector.z, transformation, result);\n }\n Vector3.transformCoordinatesToRef = transformCoordinatesToRef;\n /**\n * Sets the given vector \"result\" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z)\n * This method computes tranformed coordinates only, not transformed direction vectors\n * @param x - define the x coordinate of the source vector\n * @param y - define the y coordinate of the source vector\n * @param z - define the z coordinate of the source vector\n * @param transformation - defines the transformation matrix\n * @param result - defines the Vector3 where to store the result\n */\n function transformCoordinatesFromFloatsToRef(x, y, z, transformation, result) {\n const m = transformation._m;\n const rx = x * m[0] + y * m[4] + z * m[8] + m[12];\n const ry = x * m[1] + y * m[5] + z * m[9] + m[13];\n const rz = x * m[2] + y * m[6] + z * m[10] + m[14];\n const rw = 1 / (x * m[3] + y * m[7] + z * m[11] + m[15]);\n result.x = rx * rw;\n result.y = ry * rw;\n result.z = rz * rw;\n }\n Vector3.transformCoordinatesFromFloatsToRef = transformCoordinatesFromFloatsToRef;\n /**\n * Returns a new Vector3 set with the result of the normal transformation by the given matrix of the given vector\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\n * @param vector - defines the Vector3 to transform\n * @param transformation - defines the transformation matrix\n * @returns the new Vector3\n */\n function transformNormal(vector, transformation) {\n const result = Zero();\n transformNormalToRef(vector, transformation, result);\n return result;\n }\n Vector3.transformNormal = transformNormal;\n /**\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given vector\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\n * @param vector - defines the Vector3 to transform\n * @param transformation - defines the transformation matrix\n * @param result - defines the Vector3 where to store the result\n */\n function transformNormalToRef(vector, transformation, result) {\n transformNormalFromFloatsToRef(vector.x, vector.y, vector.z, transformation, result);\n }\n Vector3.transformNormalToRef = transformNormalToRef;\n /**\n * Sets the given vector \"result\" with the result of the normal transformation by the given matrix of the given floats (x, y, z)\n * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)\n * @param x - define the x coordinate of the source vector\n * @param y - define the y coordinate of the source vector\n * @param z - define the z coordinate of the source vector\n * @param transformation - defines the transformation matrix\n * @param result - defines the Vector3 where to store the result\n */\n function transformNormalFromFloatsToRef(x, y, z, transformation, result) {\n const m = transformation._m;\n result.x = x * m[0] + y * m[4] + z * m[8];\n result.y = x * m[1] + y * m[5] + z * m[9];\n result.z = x * m[2] + y * m[6] + z * m[10];\n }\n Vector3.transformNormalFromFloatsToRef = transformNormalFromFloatsToRef;\n /**\n * Returns a new Vector3 located for \"amount\" on the CatmullRom interpolation spline defined by the vectors \"value1\", \"value2\", \"value3\", \"value4\"\n * @param value1 - defines the first control point\n * @param value2 - defines the second control point\n * @param value3 - defines the third control point\n * @param value4 - defines the fourth control point\n * @param amount - defines the amount on the spline to use\n * @returns the new Vector3\n */\n function catmullRom(value1, value2, value3, value4, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const x = 0.5 *\n (2.0 * value2.x +\n (-value1.x + value3.x) * amount +\n (2.0 * value1.x - 5.0 * value2.x + 4.0 * value3.x - value4.x) *\n squared +\n (-value1.x + 3.0 * value2.x - 3.0 * value3.x + value4.x) * cubed);\n const y = 0.5 *\n (2.0 * value2.y +\n (-value1.y + value3.y) * amount +\n (2.0 * value1.y - 5.0 * value2.y + 4.0 * value3.y - value4.y) *\n squared +\n (-value1.y + 3.0 * value2.y - 3.0 * value3.y + value4.y) * cubed);\n const z = 0.5 *\n (2.0 * value2.z +\n (-value1.z + value3.z) * amount +\n (2.0 * value1.z - 5.0 * value2.z + 4.0 * value3.z - value4.z) *\n squared +\n (-value1.z + 3.0 * value2.z - 3.0 * value3.z + value4.z) * cubed);\n return create(x, y, z);\n }\n Vector3.catmullRom = catmullRom;\n /**\n * Returns a new Vector3 set with the coordinates of \"value\", if the vector \"value\" is in the cube defined by the vectors \"min\" and \"max\"\n * If a coordinate value of \"value\" is lower than one of the \"min\" coordinate, then this \"value\" coordinate is set with the \"min\" one\n * If a coordinate value of \"value\" is greater than one of the \"max\" coordinate, then this \"value\" coordinate is set with the \"max\" one\n * @param value - defines the current value\n * @param min - defines the lower range value\n * @param max - defines the upper range value\n * @returns the new Vector3\n */\n function clamp(value, min, max) {\n const v = create();\n clampToRef(value, min, max, v);\n return v;\n }\n Vector3.clamp = clamp;\n /**\n * Sets the given vector \"result\" with the coordinates of \"value\", if the vector \"value\" is in the cube defined by the vectors \"min\" and \"max\"\n * If a coordinate value of \"value\" is lower than one of the \"min\" coordinate, then this \"value\" coordinate is set with the \"min\" one\n * If a coordinate value of \"value\" is greater than one of the \"max\" coordinate, then this \"value\" coordinate is set with the \"max\" one\n * @param value - defines the current value\n * @param min - defines the lower range value\n * @param max - defines the upper range value\n * @param result - defines the Vector3 where to store the result\n */\n function clampToRef(value, min, max, result) {\n let x = value.x;\n x = x > max.x ? max.x : x;\n x = x < min.x ? min.x : x;\n let y = value.y;\n y = y > max.y ? max.y : y;\n y = y < min.y ? min.y : y;\n let z = value.z;\n z = z > max.z ? max.z : z;\n z = z < min.z ? min.z : z;\n copyFromFloats(x, y, z, result);\n }\n Vector3.clampToRef = clampToRef;\n /**\n * Returns a new Vector3 located for \"amount\" (float) on the Hermite interpolation spline defined by the vectors \"value1\", \"tangent1\", \"value2\", \"tangent2\"\n * @param value1 - defines the first control point\n * @param tangent1 - defines the first tangent vector\n * @param value2 - defines the second control point\n * @param tangent2 - defines the second tangent vector\n * @param amount - defines the amount on the interpolation spline (between 0 and 1)\n * @returns the new Vector3\n */\n function hermite(value1, tangent1, value2, tangent2, amount) {\n const squared = amount * amount;\n const cubed = amount * squared;\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\n const part2 = -2.0 * cubed + 3.0 * squared;\n const part3 = cubed - 2.0 * squared + amount;\n const part4 = cubed - squared;\n const x = value1.x * part1 +\n value2.x * part2 +\n tangent1.x * part3 +\n tangent2.x * part4;\n const y = value1.y * part1 +\n value2.y * part2 +\n tangent1.y * part3 +\n tangent2.y * part4;\n const z = value1.z * part1 +\n value2.z * part2 +\n tangent1.z * part3 +\n tangent2.z * part4;\n return create(x, y, z);\n }\n Vector3.hermite = hermite;\n /**\n * Gets the minimal coordinate values between two Vector3\n * @param left - defines the first operand\n * @param right - defines the second operand\n * @returns the new Vector3\n */\n function minimize(left, right) {\n const min = create();\n minimizeInPlaceFromFloatsToRef(right, left.x, left.y, left.z, min);\n return min;\n }\n Vector3.minimize = minimize;\n /**\n * Gets the maximal coordinate values between two Vector3\n * @param left - defines the first operand\n * @param right - defines the second operand\n * @returns the new Vector3\n */\n function maximize(left, right) {\n const max = create();\n maximizeInPlaceFromFloatsToRef(left, right.x, right.y, right.z, max);\n return max;\n }\n Vector3.maximize = maximize;\n /**\n * Returns the distance between the vectors \"value1\" and \"value2\"\n * @param value1 - defines the first operand\n * @param value2 - defines the second operand\n * @returns the distance\n */\n function distance(value1, value2) {\n return Math.sqrt(distanceSquared(value1, value2));\n }\n Vector3.distance = distance;\n /**\n * Returns the squared distance between the vectors \"value1\" and \"value2\"\n * @param value1 - defines the first operand\n * @param value2 - defines the second operand\n * @returns the squared distance\n */\n function distanceSquared(value1, value2) {\n const x = value1.x - value2.x;\n const y = value1.y - value2.y;\n const z = value1.z - value2.z;\n return x * x + y * y + z * z;\n }\n Vector3.distanceSquared = distanceSquared;\n /**\n * Returns a new Vector3 located at the center between \"value1\" and \"value2\"\n * @param value1 - defines the first operand\n * @param value2 - defines the second operand\n * @returns the new Vector3\n */\n function center(value1, value2) {\n const center = add(value1, value2);\n scaleToRef(center, 0.5, center);\n return center;\n }\n Vector3.center = center;\n /**\n * Given three orthogonal normalized left-handed oriented Vector3 axis in space (target system),\n * RotationFromAxis() returns the rotation Euler angles (ex : rotation.x, rotation.y, rotation.z) to apply\n * to something in order to rotate it from its local system to the given target system\n * Note: axis1, axis2 and axis3 are normalized during this operation\n * @param axis1 - defines the first axis\n * @param axis2 - defines the second axis\n * @param axis3 - defines the third axis\n * @returns a new Vector3\n */\n function rotationFromAxis(axis1, axis2, axis3) {\n const rotation = Zero();\n rotationFromAxisToRef(axis1, axis2, axis3, rotation);\n return rotation;\n }\n Vector3.rotationFromAxis = rotationFromAxis;\n /**\n * The same than RotationFromAxis but updates the given ref Vector3 parameter instead of returning a new Vector3\n * @param axis1 - defines the first axis\n * @param axis2 - defines the second axis\n * @param axis3 - defines the third axis\n * @param ref - defines the Vector3 where to store the result\n */\n function rotationFromAxisToRef(axis1, axis2, axis3, result) {\n const quat = Quaternion.create();\n Quaternion.fromAxisToRotationQuaternionToRef(axis1, axis2, axis3, quat);\n copyFrom(Quaternion.toEulerAngles(quat), result);\n }\n Vector3.rotationFromAxisToRef = rotationFromAxisToRef;\n /**\n * Creates a string representation of the Vector3\n * @returns a string with the Vector3 coordinates.\n */\n function toString(vector) {\n return `(${vector.x}, ${vector.y}, ${vector.z})`;\n }\n Vector3.toString = toString;\n /**\n * Creates the Vector3 hash code\n * @returns a number which tends to be unique between Vector3 instances\n */\n function getHashCode(vector) {\n let hash = vector.x || 0;\n hash = (hash * 397) ^ (vector.y || 0);\n hash = (hash * 397) ^ (vector.z || 0);\n return hash;\n }\n Vector3.getHashCode = getHashCode;\n /**\n * Returns true if the vector1 and the vector2 coordinates are strictly equal\n * @param vector1 - defines the first operand\n * @param vector2 - defines the second operand\n * @returns true if both vectors are equals\n */\n function equals(vector1, vector2) {\n return (vector1.x === vector2.x &&\n vector1.y === vector2.y &&\n vector1.z === vector2.z);\n }\n Vector3.equals = equals;\n /**\n * Returns true if the current Vector3 and the given vector coordinates are distant less than epsilon\n * @param otherVector - defines the second operand\n * @param epsilon - defines the minimal distance to define values as equals\n * @returns true if both vectors are distant less than epsilon\n */\n function equalsWithEpsilon(vector1, vector2, epsilon = Epsilon) {\n return (Scalar.withinEpsilon(vector1.x, vector2.x, epsilon) &&\n Scalar.withinEpsilon(vector1.y, vector2.y, epsilon) &&\n Scalar.withinEpsilon(vector1.z, vector2.z, epsilon));\n }\n Vector3.equalsWithEpsilon = equalsWithEpsilon;\n /**\n * Returns true if the current Vector3 coordinates equals the given floats\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @returns true if both vectors are equals\n */\n function equalsToFloats(vector, x, y, z) {\n return vector.x === x && vector.y === y && vector.z === z;\n }\n Vector3.equalsToFloats = equalsToFloats;\n /**\n * Returns a new Vector3, result of the multiplication of vector1 by the vector2\n * @param vector1 - defines the first operand\n * @param vector2 - defines the second operand\n * @returns the new Vector3\n */\n function multiply(vector1, vector2) {\n const result = create();\n multiplyToRef(vector1, vector2, result);\n return result;\n }\n Vector3.multiply = multiply;\n /**\n * Multiplies the current Vector3 by the given one and stores the result in the given vector \"result\"\n * @param otherVector - defines the second operand\n * @param result - defines the Vector3 object where to store the result\n * @returns the current Vector3\n */\n function multiplyToRef(vector1, vector2, result) {\n result.x = vector1.x * vector2.x;\n result.y = vector1.y * vector2.y;\n result.z = vector1.z * vector2.z;\n }\n Vector3.multiplyToRef = multiplyToRef;\n /**\n * Returns a new Vector3 set with the result of the mulliplication of the current Vector3 coordinates by the given floats\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @returns the new Vector3\n */\n function multiplyByFloatsToRef(vector1, x, y, z, result) {\n result.x = vector1.x * x;\n result.y = vector1.y * y;\n result.z = vector1.z * z;\n }\n Vector3.multiplyByFloatsToRef = multiplyByFloatsToRef;\n /**\n * Returns a new Vector3 set with the result of the mulliplication of the current Vector3 coordinates by the given floats\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @returns the new Vector3\n */\n function multiplyByFloats(vector1, x, y, z) {\n const result = create();\n multiplyByFloatsToRef(vector1, x, y, z, result);\n return result;\n }\n Vector3.multiplyByFloats = multiplyByFloats;\n /**\n * Returns a new Vector3 set with the result of the division of the current Vector3 coordinates by the given ones\n * @param otherVector - defines the second operand\n * @returns the new Vector3\n */\n function divide(vector1, vector2) {\n return {\n x: vector1.x / vector2.x,\n y: vector1.y / vector2.y,\n z: vector1.z / vector2.z\n };\n }\n Vector3.divide = divide;\n /**\n * Divides the current Vector3 coordinates by the given ones and stores the result in the given vector \"result\"\n * @param otherVector - defines the second operand\n * @param result - defines the Vector3 object where to store the result\n * @returns the current Vector3\n */\n function divideToRef(vector1, vector2, result) {\n result.x = vector1.x / vector2.x;\n result.y = vector1.y / vector2.y;\n result.z = vector1.z / vector2.z;\n }\n Vector3.divideToRef = divideToRef;\n /**\n * Set result Vector3 with the maximal coordinate values between vector1 and the given coordinates\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @param result - the set Vector3\n */\n function maximizeInPlaceFromFloatsToRef(vector1, x, y, z, result) {\n if (x > vector1.x) {\n result.x = x;\n }\n else {\n result.x = vector1.x;\n }\n if (y > vector1.y) {\n result.y = y;\n }\n else {\n result.y = vector1.y;\n }\n if (z > vector1.z) {\n result.z = z;\n }\n else {\n result.z = vector1.z;\n }\n }\n Vector3.maximizeInPlaceFromFloatsToRef = maximizeInPlaceFromFloatsToRef;\n /**\n * Set result Vector3 with the minimal coordinate values between vector1 and the given coordinates\n * @param x - defines the x coordinate of the operand\n * @param y - defines the y coordinate of the operand\n * @param z - defines the z coordinate of the operand\n * @param result - the set Vector3\n */\n function minimizeInPlaceFromFloatsToRef(vector1, x, y, z, result) {\n if (x < vector1.x) {\n result.x = x;\n }\n else {\n result.x = vector1.x;\n }\n if (y < vector1.y) {\n result.y = y;\n }\n else {\n result.y = vector1.y;\n }\n if (z < vector1.z) {\n result.z = z;\n }\n else {\n result.z = vector1.z;\n }\n }\n Vector3.minimizeInPlaceFromFloatsToRef = minimizeInPlaceFromFloatsToRef;\n /**\n * Gets a new Vector3 from vector1 floored values\n * @returns a new Vector3\n */\n function floor(vector1) {\n return create(Math.floor(vector1.x), Math.floor(vector1.y), Math.floor(vector1.z));\n }\n Vector3.floor = floor;\n /**\n * Gets a new Vector3 from vector1 floored values\n * @returns a new Vector3\n */\n function fract(vector1) {\n return create(vector1.x - Math.floor(vector1.x), vector1.y - Math.floor(vector1.y), vector1.z - Math.floor(vector1.z));\n }\n Vector3.fract = fract;\n /**\n * Returns a new Vector3 set to (0.0, 0.0, 0.0)\n * @returns a new empty Vector3\n */\n function Zero() {\n return create(0.0, 0.0, 0.0);\n }\n Vector3.Zero = Zero;\n /**\n * Returns a new Vector3 set to (1.0, 1.0, 1.0)\n * @returns a new unit Vector3\n */\n function One() {\n return create(1.0, 1.0, 1.0);\n }\n Vector3.One = One;\n /**\n * Returns a new Vector3 set tolengthSquared (0.0, 1.0, 0.0)\n * @returns a new up Vector3\n */\n function Up() {\n return create(0.0, 1.0, 0.0);\n }\n Vector3.Up = Up;\n /**\n * Returns a new Vector3 set to (0.0, -1.0, 0.0)\n * @returns a new down Vector3\n */\n function Down() {\n return create(0.0, -1.0, 0.0);\n }\n Vector3.Down = Down;\n /**\n * Returns a new Vector3 set to (0.0, 0.0, 1.0)\n * @returns a new forward Vector3\n */\n function Forward() {\n return create(0.0, 0.0, 1.0);\n }\n Vector3.Forward = Forward;\n /**\n * Returns a new Vector3 set to (0.0, 0.0, -1.0)\n * @returns a new forward Vector3\n */\n function Backward() {\n return create(0.0, 0.0, -1.0);\n }\n Vector3.Backward = Backward;\n /**\n * Returns a new Vector3 set to (1.0, 0.0, 0.0)\n * @returns a new right Vector3\n */\n function Right() {\n return create(1.0, 0.0, 0.0);\n }\n Vector3.Right = Right;\n /**\n * Returns a new Vector3 set to (-1.0, 0.0, 0.0)\n * @returns a new left Vector3\n */\n function Left() {\n return create(-1.0, 0.0, 0.0);\n }\n Vector3.Left = Left;\n /**\n * Returns a new random Vector3\n * @returns a random Vector3\n */\n function Random() {\n return create(Math.random(), Math.random(), Math.random());\n }\n Vector3.Random = Random;\n})(Vector3 || (Vector3 = {}));\n", "import { Vector3 } from './Vector3';\nimport { Matrix } from './Matrix';\n/**\n * Represens a plane by the equation ax + by + cz + d = 0\n * @public\n */\nexport var Plane;\n(function (Plane) {\n /**\n * Creates a Plane object according to the given floats a, b, c, d and the plane equation : ax + by + cz + d = 0\n * @param a - a component of the plane\n * @param b - b component of the plane\n * @param c - c component of the plane\n * @param d - d component of the plane\n */\n function create(a, b, c, d) {\n return {\n normal: Vector3.create(a, b, c),\n d: d\n };\n }\n Plane.create = create;\n // Statics\n /**\n * Creates a plane from an array\n * @param array - the array to create a plane from\n * @returns a new Plane from the given array.\n */\n function fromArray(array) {\n return create(array[0], array[1], array[2], array[3]);\n }\n Plane.fromArray = fromArray;\n /**\n * Creates a plane from three points\n * @param point1 - point used to create the plane\n * @param point2 - point used to create the plane\n * @param point3 - point used to create the plane\n * @returns a new Plane defined by the three given points.\n */\n function fromPoints(_point1, _point2, _point3) {\n const result = create(0.0, 0.0, 0.0, 0.0);\n // TODO\n // result.copyFromPoints(point1, point2, point3)\n return result;\n }\n Plane.fromPoints = fromPoints;\n /**\n * Creates a plane from an origin point and a normal\n * @param origin - origin of the plane to be constructed\n * @param normal - normal of the plane to be constructed\n * @returns a new Plane the normal vector to this plane at the given origin point.\n * Note : the vector \"normal\" is updated because normalized.\n */\n function romPositionAndNormal(origin, normal) {\n const result = create(0.0, 0.0, 0.0, 0.0);\n result.normal = Vector3.normalize(normal);\n result.d = -(normal.x * origin.x +\n normal.y * origin.y +\n normal.z * origin.z);\n return result;\n }\n Plane.romPositionAndNormal = romPositionAndNormal;\n /**\n * Calculates the distance from a plane and a point\n * @param origin - origin of the plane to be constructed\n * @param normal - normal of the plane to be constructed\n * @param point - point to calculate distance to\n * @returns the signed distance between the plane defined by the normal vector at the \"origin\"\" point and the given other point.\n */\n function signedDistanceToPlaneFromPositionAndNormal(origin, normal, point) {\n const d = -(normal.x * origin.x + normal.y * origin.y + normal.z * origin.z);\n return Vector3.dot(point, normal) + d;\n }\n Plane.signedDistanceToPlaneFromPositionAndNormal = signedDistanceToPlaneFromPositionAndNormal;\n /**\n * @returns the plane coordinates as a new array of 4 elements [a, b, c, d].\n */\n function asArray(plane) {\n return [plane.normal.x, plane.normal.y, plane.normal.z, plane.d];\n }\n Plane.asArray = asArray;\n // Methods\n /**\n * @returns a new plane copied from the current Plane.\n */\n function clone(plane) {\n return create(plane.normal.x, plane.normal.y, plane.normal.z, plane.d);\n }\n Plane.clone = clone;\n /**\n * @returns the Plane hash code.\n */\n function getHashCode(_plane) {\n // TODO\n // let hash = plane.normal.getHashCode()\n // hash = (hash * 397) ^ (plane.d || 0)\n // return hash\n return 0;\n }\n Plane.getHashCode = getHashCode;\n /**\n * Normalize the current Plane in place.\n * @returns the updated Plane.\n */\n function normalize(plane) {\n const result = create(0, 0, 0, 0);\n const norm = Math.sqrt(plane.normal.x * plane.normal.x +\n plane.normal.y * plane.normal.y +\n plane.normal.z * plane.normal.z);\n let magnitude = 0.0;\n if (norm !== 0) {\n magnitude = 1.0 / norm;\n }\n result.normal.x = plane.normal.x * magnitude;\n result.normal.y = plane.normal.y * magnitude;\n result.normal.z = plane.normal.z * magnitude;\n result.d *= magnitude;\n return plane;\n }\n Plane.normalize = normalize;\n /**\n * Applies a transformation the plane and returns the result\n * @param transformation - the transformation matrix to be applied to the plane\n * @returns a new Plane as the result of the transformation of the current Plane by the given matrix.\n */\n function transform(plane, transformation) {\n const transposedMatrix = Matrix.create();\n Matrix.transposeToRef(transformation, transposedMatrix);\n const m = transposedMatrix._m;\n const x = plane.normal.x;\n const y = plane.normal.y;\n const z = plane.normal.z;\n const d = plane.d;\n const normalX = x * m[0] + y * m[1] + z * m[2] + d * m[3];\n const normalY = x * m[4] + y * m[5] + z * m[6] + d * m[7];\n const normalZ = x * m[8] + y * m[9] + z * m[10] + d * m[11];\n const finalD = x * m[12] + y * m[13] + z * m[14] + d * m[15];\n return create(normalX, normalY, normalZ, finalD);\n }\n Plane.transform = transform;\n /**\n * Calcualtte the dot product between the point and the plane normal\n * @param point - point to calculate the dot product with\n * @returns the dot product (float) of the point coordinates and the plane normal.\n */\n function dotCoordinate(plane, point) {\n return (plane.normal.x * point.x +\n plane.normal.y * point.y +\n plane.normal.z * point.z +\n plane.d);\n }\n Plane.dotCoordinate = dotCoordinate;\n /**\n * Updates the current Plane from the plane defined by the three given points.\n * @param point1 - one of the points used to contruct the plane\n * @param point2 - one of the points used to contruct the plane\n * @param point3 - one of the points used to contruct the plane\n * @returns the updated Plane.\n */\n function copyFromPoints(point1, point2, point3) {\n const x1 = point2.x - point1.x;\n const y1 = point2.y - point1.y;\n const z1 = point2.z - point1.z;\n const x2 = point3.x - point1.x;\n const y2 = point3.y - point1.y;\n const z2 = point3.z - point1.z;\n const yz = y1 * z2 - z1 * y2;\n const xz = z1 * x2 - x1 * z2;\n const xy = x1 * y2 - y1 * x2;\n const pyth = Math.sqrt(yz * yz + xz * xz + xy * xy);\n let invPyth;\n if (pyth !== 0) {\n invPyth = 1.0 / pyth;\n }\n else {\n invPyth = 0.0;\n }\n const normal = Vector3.create(yz * invPyth, xz * invPyth, xy * invPyth);\n return {\n normal,\n d: -(normal.x * point1.x + normal.y * point1.y + normal.z * point1.z)\n };\n }\n Plane.copyFromPoints = copyFromPoints;\n /**\n * Checks if the plane is facing a given direction\n * @param direction - the direction to check if the plane is facing\n * @param epsilon - value the dot product is compared against (returns true if dot <= epsilon)\n * @returns True is the vector \"direction\" is the same side than the plane normal.\n */\n function isFrontFacingTo(plane, direction, epsilon) {\n const dot = Vector3.dot(plane.normal, direction);\n return dot <= epsilon;\n }\n Plane.isFrontFacingTo = isFrontFacingTo;\n /**\n * Calculates the distance to a point\n * @param point - point to calculate distance to\n * @returns the signed distance (float) from the given point to the Plane.\n */\n function signedDistanceTo(plane, point) {\n return Vector3.dot(point, plane.normal) + plane.d;\n }\n Plane.signedDistanceTo = signedDistanceTo;\n})(Plane || (Plane = {}));\n", "import { Vector3 } from './Vector3';\nimport { Quaternion } from './Quaternion';\nimport { Plane } from './Plane';\n/**\n * Class used to store matrix data (4x4)\n * @public\n */\nexport var Matrix;\n(function (Matrix) {\n /**\n * Gets the internal data of the matrix\n */\n function m(self) {\n return self._m;\n }\n Matrix.m = m;\n let _updateFlagSeed = 0;\n const _identityReadonly = {};\n /**\n * Gets an identity matrix that must not be updated\n */\n function IdentityReadonly() {\n return _identityReadonly;\n }\n Matrix.IdentityReadonly = IdentityReadonly;\n /**\n * Creates an empty matrix (filled with zeros)\n */\n function create() {\n const newMatrix = {\n updateFlag: 0,\n isIdentity: false,\n isIdentity3x2: true,\n _isIdentityDirty: true,\n _isIdentity3x2Dirty: true,\n _m: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n };\n _updateIdentityStatus(newMatrix, false);\n return newMatrix;\n }\n Matrix.create = create;\n // Statics\n /**\n * Creates a matrix from an array\n * @param array - defines the source array\n * @param offset - defines an offset in the source array\n * @returns a new Matrix set from the starting index of the given array\n */\n function fromArray(array, offset = 0) {\n const result = create();\n fromArrayToRef(array, offset, result);\n return result;\n }\n Matrix.fromArray = fromArray;\n /**\n * Copy the content of an array into a given matrix\n * @param array - defines the source array\n * @param offset - defines an offset in the source array\n * @param result - defines the target matrix\n */\n function fromArrayToRef(array, offset, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] = array[index + offset];\n }\n _markAsUpdated(result);\n }\n Matrix.fromArrayToRef = fromArrayToRef;\n /**\n * Stores an array into a matrix after having multiplied each component by a given factor\n * @param array - defines the source array\n * @param offset - defines the offset in the source array\n * @param scale - defines the scaling factor\n * @param result - defines the target matrix\n */\n function fromFloatArrayToRefScaled(array, offset, scale, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] = array[index + offset] * scale;\n }\n _markAsUpdated(result);\n }\n Matrix.fromFloatArrayToRefScaled = fromFloatArrayToRefScaled;\n /**\n * Stores a list of values (16) inside a given matrix\n * @param initialM11 - defines 1st value of 1st row\n * @param initialM12 - defines 2nd value of 1st row\n * @param initialM13 - defines 3rd value of 1st row\n * @param initialM14 - defines 4th value of 1st row\n * @param initialM21 - defines 1st value of 2nd row\n * @param initialM22 - defines 2nd value of 2nd row\n * @param initialM23 - defines 3rd value of 2nd row\n * @param initialM24 - defines 4th value of 2nd row\n * @param initialM31 - defines 1st value of 3rd row\n * @param initialM32 - defines 2nd value of 3rd row\n * @param initialM33 - defines 3rd value of 3rd row\n * @param initialM34 - defines 4th value of 3rd row\n * @param initialM41 - defines 1st value of 4th row\n * @param initialM42 - defines 2nd value of 4th row\n * @param initialM43 - defines 3rd value of 4th row\n * @param initialM44 - defines 4th value of 4th row\n * @param result - defines the target matrix\n */\n function fromValuesToRef(initialM11, initialM12, initialM13, initialM14, initialM21, initialM22, initialM23, initialM24, initialM31, initialM32, initialM33, initialM34, initialM41, initialM42, initialM43, initialM44, result) {\n const m = result._m;\n m[0] = initialM11;\n m[1] = initialM12;\n m[2] = initialM13;\n m[3] = initialM14;\n m[4] = initialM21;\n m[5] = initialM22;\n m[6] = initialM23;\n m[7] = initialM24;\n m[8] = initialM31;\n m[9] = initialM32;\n m[10] = initialM33;\n m[11] = initialM34;\n m[12] = initialM41;\n m[13] = initialM42;\n m[14] = initialM43;\n m[15] = initialM44;\n _markAsUpdated(result);\n }\n Matrix.fromValuesToRef = fromValuesToRef;\n /**\n * Creates new matrix from a list of values (16)\n * @param initialM11 - defines 1st value of 1st row\n * @param initialM12 - defines 2nd value of 1st row\n * @param initialM13 - defines 3rd value of 1st row\n * @param initialM14 - defines 4th value of 1st row\n * @param initialM21 - defines 1st value of 2nd row\n * @param initialM22 - defines 2nd value of 2nd row\n * @param initialM23 - defines 3rd value of 2nd row\n * @param initialM24 - defines 4th value of 2nd row\n * @param initialM31 - defines 1st value of 3rd row\n * @param initialM32 - defines 2nd value of 3rd row\n * @param initialM33 - defines 3rd value of 3rd row\n * @param initialM34 - defines 4th value of 3rd row\n * @param initialM41 - defines 1st value of 4th row\n * @param initialM42 - defines 2nd value of 4th row\n * @param initialM43 - defines 3rd value of 4th row\n * @param initialM44 - defines 4th value of 4th row\n * @returns the new matrix\n */\n function fromValues(initialM11, initialM12, initialM13, initialM14, initialM21, initialM22, initialM23, initialM24, initialM31, initialM32, initialM33, initialM34, initialM41, initialM42, initialM43, initialM44) {\n const result = create();\n const m = result._m;\n m[0] = initialM11;\n m[1] = initialM12;\n m[2] = initialM13;\n m[3] = initialM14;\n m[4] = initialM21;\n m[5] = initialM22;\n m[6] = initialM23;\n m[7] = initialM24;\n m[8] = initialM31;\n m[9] = initialM32;\n m[10] = initialM33;\n m[11] = initialM34;\n m[12] = initialM41;\n m[13] = initialM42;\n m[14] = initialM43;\n m[15] = initialM44;\n _markAsUpdated(result);\n return result;\n }\n Matrix.fromValues = fromValues;\n /**\n * Creates a new matrix composed by merging scale (vector3), rotation (quaternion) and translation (vector3)\n * @param scale - defines the scale vector3\n * @param rotation - defines the rotation quaternion\n * @param translation - defines the translation vector3\n * @returns a new matrix\n */\n function compose(scale, rotation, translation) {\n const result = create();\n composeToRef(scale, rotation, translation, result);\n return result;\n }\n Matrix.compose = compose;\n /**\n * Sets a matrix to a value composed by merging scale (vector3), rotation (quaternion) and translation (vector3)\n * @param scale - defines the scale vector3\n * @param rotation - defines the rotation quaternion\n * @param translation - defines the translation vector3\n * @param result - defines the target matrix\n */\n function composeToRef(scale, rotation, translation, result) {\n const tmpMatrix = [create(), create(), create()];\n scalingToRef(scale.x, scale.y, scale.z, tmpMatrix[1]);\n fromQuaternionToRef(rotation, tmpMatrix[0]);\n multiplyToRef(tmpMatrix[1], tmpMatrix[0], result);\n setTranslation(result, translation);\n }\n Matrix.composeToRef = composeToRef;\n /**\n * Creates a new identity matrix\n * @returns a new identity matrix\n */\n function Identity() {\n const identity = fromValues(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);\n _updateIdentityStatus(identity, true);\n return identity;\n }\n Matrix.Identity = Identity;\n /**\n * Creates a new identity matrix and stores the result in a given matrix\n * @param result - defines the target matrix\n */\n function IdentityToRef(result) {\n fromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n _updateIdentityStatus(result, true);\n }\n Matrix.IdentityToRef = IdentityToRef;\n /**\n * Creates a new zero matrix\n * @returns a new zero matrix\n */\n function Zero() {\n const zero = fromValues(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);\n _updateIdentityStatus(zero, false);\n return zero;\n }\n Matrix.Zero = Zero;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the X axis\n * @param angle - defines the angle (in radians) to use\n * @returns the new matrix\n */\n function RotationX(angle) {\n const result = create();\n rotationXToRef(angle, result);\n return result;\n }\n Matrix.RotationX = RotationX;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the X axis and stores it in a given matrix\n * @param angle - defines the angle (in radians) to use\n * @param result - defines the target matrix\n */\n function rotationXToRef(angle, result) {\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n fromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, c, s, 0.0, 0.0, -s, c, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n _updateIdentityStatus(result, c === 1 && s === 0);\n }\n Matrix.rotationXToRef = rotationXToRef;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Y axis\n * @param angle - defines the angle (in radians) to use\n * @returns the new matrix\n */\n function rotationY(angle) {\n const result = create();\n rotationYToRef(angle, result);\n return result;\n }\n Matrix.rotationY = rotationY;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Y axis and stores it in a given matrix\n * @param angle - defines the angle (in radians) to use\n * @param result - defines the target matrix\n */\n function rotationYToRef(angle, result) {\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n fromValuesToRef(c, 0.0, -s, 0.0, 0.0, 1.0, 0.0, 0.0, s, 0.0, c, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n _updateIdentityStatus(result, c === 1 && s === 0);\n }\n Matrix.rotationYToRef = rotationYToRef;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Z axis\n * @param angle - defines the angle (in radians) to use\n * @returns the new matrix\n */\n function rotationZ(angle) {\n const result = create();\n rotationZToRef(angle, result);\n return result;\n }\n Matrix.rotationZ = rotationZ;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the Z axis and stores it in a given matrix\n * @param angle - defines the angle (in radians) to use\n * @param result - defines the target matrix\n */\n function rotationZToRef(angle, result) {\n const s = Math.sin(angle);\n const c = Math.cos(angle);\n fromValuesToRef(c, s, 0.0, 0.0, -s, c, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n _updateIdentityStatus(result, c === 1 && s === 0);\n }\n Matrix.rotationZToRef = rotationZToRef;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the given axis\n * @param axis - defines the axis to use\n * @param angle - defines the angle (in radians) to use\n * @returns the new matrix\n */\n function rotationAxis(axis, angle) {\n const result = create();\n rotationAxisToRef(axis, angle, result);\n return result;\n }\n Matrix.rotationAxis = rotationAxis;\n /**\n * Creates a new rotation matrix for \"angle\" radians around the given axis and stores it in a given matrix\n * @param axis - defines the axis to use\n * @param angle - defines the angle (in radians) to use\n * @param result - defines the target matrix\n */\n function rotationAxisToRef(_axis, angle, result) {\n const s = Math.sin(-angle);\n const c = Math.cos(-angle);\n const c1 = 1 - c;\n const axis = Vector3.normalize(_axis);\n const m = result._m;\n m[0] = axis.x * axis.x * c1 + c;\n m[1] = axis.x * axis.y * c1 - axis.z * s;\n m[2] = axis.x * axis.z * c1 + axis.y * s;\n m[3] = 0.0;\n m[4] = axis.y * axis.x * c1 + axis.z * s;\n m[5] = axis.y * axis.y * c1 + c;\n m[6] = axis.y * axis.z * c1 - axis.x * s;\n m[7] = 0.0;\n m[8] = axis.z * axis.x * c1 - axis.y * s;\n m[9] = axis.z * axis.y * c1 + axis.x * s;\n m[10] = axis.z * axis.z * c1 + c;\n m[11] = 0.0;\n m[12] = 0.0;\n m[13] = 0.0;\n m[14] = 0.0;\n m[15] = 1.0;\n _markAsUpdated(result);\n }\n Matrix.rotationAxisToRef = rotationAxisToRef;\n /**\n * Creates a rotation matrix\n * @param yaw - defines the yaw angle in radians (Y axis)\n * @param pitch - defines the pitch angle in radians (X axis)\n * @param roll - defines the roll angle in radians (X axis)\n * @returns the new rotation matrix\n */\n function rotationYawPitchRoll(yaw, pitch, roll) {\n const result = create();\n rotationYawPitchRollToRef(yaw, pitch, roll, result);\n return result;\n }\n Matrix.rotationYawPitchRoll = rotationYawPitchRoll;\n /**\n * Creates a rotation matrix and stores it in a given matrix\n * @param yaw - defines the yaw angle in radians (Y axis)\n * @param pitch - defines the pitch angle in radians (X axis)\n * @param roll - defines the roll angle in radians (X axis)\n * @param result - defines the target matrix\n */\n function rotationYawPitchRollToRef(yaw, pitch, roll, result) {\n const quaternionResult = Quaternion.Zero();\n Quaternion.fromRotationYawPitchRollToRef(yaw, pitch, roll, quaternionResult);\n fromQuaternionToRef(quaternionResult, result);\n }\n Matrix.rotationYawPitchRollToRef = rotationYawPitchRollToRef;\n /**\n * Creates a scaling matrix\n * @param x - defines the scale factor on X axis\n * @param y - defines the scale factor on Y axis\n * @param z - defines the scale factor on Z axis\n * @returns the new matrix\n */\n function scaling(x, y, z) {\n const result = create();\n scalingToRef(x, y, z, result);\n return result;\n }\n Matrix.scaling = scaling;\n /**\n * Creates a scaling matrix and stores it in a given matrix\n * @param x - defines the scale factor on X axis\n * @param y - defines the scale factor on Y axis\n * @param z - defines the scale factor on Z axis\n * @param result - defines the target matrix\n */\n function scalingToRef(x, y, z, result) {\n fromValuesToRef(x, 0.0, 0.0, 0.0, 0.0, y, 0.0, 0.0, 0.0, 0.0, z, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n _updateIdentityStatus(result, x === 1 && y === 1 && z === 1);\n }\n Matrix.scalingToRef = scalingToRef;\n /**\n * Creates a translation matrix\n * @param x - defines the translation on X axis\n * @param y - defines the translation on Y axis\n * @param z - defines the translationon Z axis\n * @returns the new matrix\n */\n function translation(x, y, z) {\n const result = create();\n translationToRef(x, y, z, result);\n return result;\n }\n Matrix.translation = translation;\n /**\n * Creates a translation matrix and stores it in a given matrix\n * @param x - defines the translation on X axis\n * @param y - defines the translation on Y axis\n * @param z - defines the translationon Z axis\n * @param result - defines the target matrix\n */\n function translationToRef(x, y, z, result) {\n fromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, x, y, z, 1.0, result);\n _updateIdentityStatus(result, x === 0 && y === 0 && z === 0);\n }\n Matrix.translationToRef = translationToRef;\n /**\n * Returns a new Matrix whose values are the interpolated values for \"gradient\" (float) between the ones of the matrices \"startValue\" and \"endValue\".\n * @param startValue - defines the start value\n * @param endValue - defines the end value\n * @param gradient - defines the gradient factor\n * @returns the new matrix\n */\n function lerp(startValue, endValue, gradient) {\n const result = create();\n lerpToRef(startValue, endValue, gradient, result);\n return result;\n }\n Matrix.lerp = lerp;\n /**\n * Set the given matrix \"result\" as the interpolated values for \"gradient\" (float) between the ones of the matrices \"startValue\" and \"endValue\".\n * @param startValue - defines the start value\n * @param endValue - defines the end value\n * @param gradient - defines the gradient factor\n * @param result - defines the Matrix object where to store data\n */\n function lerpToRef(startValue, endValue, gradient, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] =\n startValue._m[index] * (1.0 - gradient) + endValue._m[index] * gradient;\n }\n _markAsUpdated(result);\n }\n Matrix.lerpToRef = lerpToRef;\n /**\n * Builds a new matrix whose values are computed by:\n * * decomposing the the \"startValue\" and \"endValue\" matrices into their respective scale, rotation and translation matrices\n * * interpolating for \"gradient\" (float) the values between each of these decomposed matrices between the start and the end\n * * recomposing a new matrix from these 3 interpolated scale, rotation and translation matrices\n * @param startValue - defines the first matrix\n * @param endValue - defines the second matrix\n * @param gradient - defines the gradient between the two matrices\n * @returns the new matrix\n */\n function decomposeLerp(startValue, endValue, gradient) {\n const result = create();\n decomposeLerpToRef(startValue, endValue, gradient, result);\n return result;\n }\n Matrix.decomposeLerp = decomposeLerp;\n /**\n * Update a matrix to values which are computed by:\n * * decomposing the the \"startValue\" and \"endValue\" matrices into their respective scale, rotation and translation matrices\n * * interpolating for \"gradient\" (float) the values between each of these decomposed matrices between the start and the end\n * * recomposing a new matrix from these 3 interpolated scale, rotation and translation matrices\n * @param startValue - defines the first matrix\n * @param endValue - defines the second matrix\n * @param gradient - defines the gradient between the two matrices\n * @param result - defines the target matrix\n */\n function decomposeLerpToRef(startValue, endValue, gradient, result) {\n const startScale = Vector3.Zero();\n const startRotation = Quaternion.Zero();\n const startTranslation = Vector3.Zero();\n decompose(startValue, startScale, startRotation, startTranslation);\n const endScale = Vector3.Zero();\n const endRotation = Quaternion.Zero();\n const endTranslation = Vector3.Zero();\n decompose(endValue, endScale, endRotation, endTranslation);\n const resultScale = Vector3.Zero();\n Vector3.lerpToRef(startScale, endScale, gradient, resultScale);\n const resultRotation = Quaternion.Zero();\n Quaternion.slerpToRef(startRotation, endRotation, gradient, resultRotation);\n const resultTranslation = Vector3.Zero();\n Vector3.lerpToRef(startTranslation, endTranslation, gradient, resultTranslation);\n composeToRef(resultScale, resultRotation, resultTranslation, result);\n }\n Matrix.decomposeLerpToRef = decomposeLerpToRef;\n /**\n * Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\"\n * self function works in left handed mode\n * @param eye - defines the final position of the entity\n * @param target - defines where the entity should look at\n * @param up - defines the up vector for the entity\n * @returns the new matrix\n */\n function LookAtLH(eye, target, up) {\n const result = create();\n lookAtLHToRef(eye, target, up, result);\n return result;\n }\n Matrix.LookAtLH = LookAtLH;\n /**\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\".\n * self function works in left handed mode\n * @param eye - defines the final position of the entity\n * @param target - defines where the entity should look at\n * @param up - defines the up vector for the entity\n * @param result - defines the target matrix\n */\n function lookAtLHToRef(eye, target, up, result) {\n const xAxis = Vector3.Zero();\n const yAxis = Vector3.Zero();\n const zAxis = Vector3.Zero();\n // Z axis\n Vector3.subtractToRef(target, eye, zAxis);\n Vector3.normalizeToRef(zAxis, zAxis);\n // X axis\n Vector3.crossToRef(up, zAxis, xAxis);\n const xSquareLength = Vector3.lengthSquared(xAxis);\n if (xSquareLength === 0) {\n xAxis.x = 1.0;\n }\n else {\n Vector3.normalizeFromLengthToRef(xAxis, Math.sqrt(xSquareLength), xAxis);\n }\n // Y axis\n Vector3.crossToRef(zAxis, xAxis, yAxis);\n Vector3.normalizeToRef(yAxis, yAxis);\n // Eye angles\n const ex = -Vector3.dot(xAxis, eye);\n const ey = -Vector3.dot(yAxis, eye);\n const ez = -Vector3.dot(zAxis, eye);\n fromValuesToRef(xAxis.x, yAxis.x, zAxis.x, 0.0, xAxis.y, yAxis.y, zAxis.y, 0.0, xAxis.z, yAxis.z, zAxis.z, 0.0, ex, ey, ez, 1.0, result);\n }\n Matrix.lookAtLHToRef = lookAtLHToRef;\n /**\n * Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\"\n * self function works in right handed mode\n * @param eye - defines the final position of the entity\n * @param target - defines where the entity should look at\n * @param up - defines the up vector for the entity\n * @returns the new matrix\n */\n function lookAtRH(eye, target, up) {\n const result = create();\n lookAtRHToRef(eye, target, up, result);\n return result;\n }\n Matrix.lookAtRH = lookAtRH;\n /**\n * Sets the given \"result\" Matrix to a rotation matrix used to rotate an entity so that it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like \"up\".\n * self function works in right handed mode\n * @param eye - defines the final position of the entity\n * @param target - defines where the entity should look at\n * @param up - defines the up vector for the entity\n * @param result - defines the target matrix\n */\n function lookAtRHToRef(eye, target, up, result) {\n const xAxis = Vector3.Zero();\n const yAxis = Vector3.Zero();\n const zAxis = Vector3.Zero();\n // Z axis\n Vector3.subtractToRef(eye, target, zAxis);\n Vector3.normalizeToRef(zAxis, zAxis);\n // X axis\n Vector3.crossToRef(up, zAxis, xAxis);\n const xSquareLength = Vector3.lengthSquared(xAxis);\n if (xSquareLength === 0) {\n xAxis.x = 1.0;\n }\n else {\n Vector3.normalizeFromLengthToRef(xAxis, Math.sqrt(xSquareLength), xAxis);\n }\n // Y axis\n Vector3.crossToRef(zAxis, xAxis, yAxis);\n Vector3.normalizeToRef(yAxis, yAxis);\n // Eye angles\n const ex = -Vector3.dot(xAxis, eye);\n const ey = -Vector3.dot(yAxis, eye);\n const ez = -Vector3.dot(zAxis, eye);\n fromValuesToRef(xAxis.x, yAxis.x, zAxis.x, 0.0, xAxis.y, yAxis.y, zAxis.y, 0.0, xAxis.z, yAxis.z, zAxis.z, 0.0, ex, ey, ez, 1.0, result);\n }\n Matrix.lookAtRHToRef = lookAtRHToRef;\n /**\n * Create a left-handed orthographic projection matrix\n * @param width - defines the viewport width\n * @param height - defines the viewport height\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a left-handed orthographic projection matrix\n */\n function orthoLH(width, height, znear, zfar) {\n const matrix = create();\n orthoLHToRef(width, height, znear, zfar, matrix);\n return matrix;\n }\n Matrix.orthoLH = orthoLH;\n /**\n * Store a left-handed orthographic projection to a given matrix\n * @param width - defines the viewport width\n * @param height - defines the viewport height\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n */\n function orthoLHToRef(width, height, znear, zfar, result) {\n const n = znear;\n const f = zfar;\n const a = 2.0 / width;\n const b = 2.0 / height;\n const c = 2.0 / (f - n);\n const d = -(f + n) / (f - n);\n fromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 0.0, 0.0, 0.0, d, 1.0, result);\n _updateIdentityStatus(result, a === 1 && b === 1 && c === 1 && d === 0);\n }\n Matrix.orthoLHToRef = orthoLHToRef;\n /**\n * Create a left-handed orthographic projection matrix\n * @param left - defines the viewport left coordinate\n * @param right - defines the viewport right coordinate\n * @param bottom - defines the viewport bottom coordinate\n * @param top - defines the viewport top coordinate\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a left-handed orthographic projection matrix\n */\n function OrthoOffCenterLH(left, right, bottom, top, znear, zfar) {\n const matrix = create();\n orthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, matrix);\n return matrix;\n }\n Matrix.OrthoOffCenterLH = OrthoOffCenterLH;\n /**\n * Stores a left-handed orthographic projection into a given matrix\n * @param left - defines the viewport left coordinate\n * @param right - defines the viewport right coordinate\n * @param bottom - defines the viewport bottom coordinate\n * @param top - defines the viewport top coordinate\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n */\n function orthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, result) {\n const n = znear;\n const f = zfar;\n const a = 2.0 / (right - left);\n const b = 2.0 / (top - bottom);\n const c = 2.0 / (f - n);\n const d = -(f + n) / (f - n);\n const i0 = (left + right) / (left - right);\n const i1 = (top + bottom) / (bottom - top);\n fromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 0.0, i0, i1, d, 1.0, result);\n _markAsUpdated(result);\n }\n Matrix.orthoOffCenterLHToRef = orthoOffCenterLHToRef;\n /**\n * Creates a right-handed orthographic projection matrix\n * @param left - defines the viewport left coordinate\n * @param right - defines the viewport right coordinate\n * @param bottom - defines the viewport bottom coordinate\n * @param top - defines the viewport top coordinate\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a right-handed orthographic projection matrix\n */\n function orthoOffCenterRH(left, right, bottom, top, znear, zfar) {\n const matrix = create();\n orthoOffCenterRHToRef(left, right, bottom, top, znear, zfar, matrix);\n return matrix;\n }\n Matrix.orthoOffCenterRH = orthoOffCenterRH;\n /**\n * Stores a right-handed orthographic projection into a given matrix\n * @param left - defines the viewport left coordinate\n * @param right - defines the viewport right coordinate\n * @param bottom - defines the viewport bottom coordinate\n * @param top - defines the viewport top coordinate\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n */\n function orthoOffCenterRHToRef(left, right, bottom, top, znear, zfar, result) {\n orthoOffCenterLHToRef(left, right, bottom, top, znear, zfar, result);\n result._m[10] *= -1; // No need to call _markAsUpdated as previous function already called it and let _isIdentityDirty to true\n }\n Matrix.orthoOffCenterRHToRef = orthoOffCenterRHToRef;\n /**\n * Creates a left-handed perspective projection matrix\n * @param width - defines the viewport width\n * @param height - defines the viewport height\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a left-handed perspective projection matrix\n */\n function perspectiveLH(width, height, znear, zfar) {\n const matrix = create();\n const n = znear;\n const f = zfar;\n const a = (2.0 * n) / width;\n const b = (2.0 * n) / height;\n const c = (f + n) / (f - n);\n const d = (-2.0 * f * n) / (f - n);\n fromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0, matrix);\n _updateIdentityStatus(matrix, false);\n return matrix;\n }\n Matrix.perspectiveLH = perspectiveLH;\n /**\n * Creates a left-handed perspective projection matrix\n * @param fov - defines the horizontal field of view\n * @param aspect - defines the aspect ratio\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a left-handed perspective projection matrix\n */\n function perspectiveFovLH(fov, aspect, znear, zfar) {\n const matrix = create();\n perspectiveFovLHToRef(fov, aspect, znear, zfar, matrix);\n return matrix;\n }\n Matrix.perspectiveFovLH = perspectiveFovLH;\n /**\n * Stores a left-handed perspective projection into a given matrix\n * @param fov - defines the horizontal field of view\n * @param aspect - defines the aspect ratio\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n * @param isVerticalFovFixed - defines it the fov is vertically fixed (default) or horizontally\n */\n function perspectiveFovLHToRef(fov, aspect, znear, zfar, result, isVerticalFovFixed = true) {\n const n = znear;\n const f = zfar;\n const t = 1.0 / Math.tan(fov * 0.5);\n const a = isVerticalFovFixed ? t / aspect : t;\n const b = isVerticalFovFixed ? t : t * aspect;\n const c = (f + n) / (f - n);\n const d = (-2.0 * f * n) / (f - n);\n fromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, 1.0, 0.0, 0.0, d, 0.0, result);\n _updateIdentityStatus(result, false);\n }\n Matrix.perspectiveFovLHToRef = perspectiveFovLHToRef;\n /**\n * Creates a right-handed perspective projection matrix\n * @param fov - defines the horizontal field of view\n * @param aspect - defines the aspect ratio\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @returns a new matrix as a right-handed perspective projection matrix\n */\n function PerspectiveFovRH(fov, aspect, znear, zfar) {\n const matrix = create();\n perspectiveFovRHToRef(fov, aspect, znear, zfar, matrix);\n return matrix;\n }\n Matrix.PerspectiveFovRH = PerspectiveFovRH;\n /**\n * Stores a right-handed perspective projection into a given matrix\n * @param fov - defines the horizontal field of view\n * @param aspect - defines the aspect ratio\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n * @param isVerticalFovFixed - defines it the fov is vertically fixed (default) or horizontally\n */\n function perspectiveFovRHToRef(fov, aspect, znear, zfar, result, isVerticalFovFixed = true) {\n /* alternatively self could be expressed as:\n // m = PerspectiveFovLHToRef\n // m[10] *= -1.0;\n // m[11] *= -1.0;\n */\n const n = znear;\n const f = zfar;\n const t = 1.0 / Math.tan(fov * 0.5);\n const a = isVerticalFovFixed ? t / aspect : t;\n const b = isVerticalFovFixed ? t : t * aspect;\n const c = -(f + n) / (f - n);\n const d = (-2 * f * n) / (f - n);\n fromValuesToRef(a, 0.0, 0.0, 0.0, 0.0, b, 0.0, 0.0, 0.0, 0.0, c, -1.0, 0.0, 0.0, d, 0.0, result);\n _updateIdentityStatus(result, false);\n }\n Matrix.perspectiveFovRHToRef = perspectiveFovRHToRef;\n /**\n * Stores a perspective projection for WebVR info a given matrix\n * @param fov - defines the field of view\n * @param znear - defines the near clip plane\n * @param zfar - defines the far clip plane\n * @param result - defines the target matrix\n * @param rightHanded - defines if the matrix must be in right-handed mode (false by default)\n */\n function perspectiveFovWebVRToRef(fov, znear, zfar, result, rightHanded = false) {\n const rightHandedFactor = rightHanded ? -1 : 1;\n const upTan = Math.tan((fov.upDegrees * Math.PI) / 180.0);\n const downTan = Math.tan((fov.downDegrees * Math.PI) / 180.0);\n const leftTan = Math.tan((fov.leftDegrees * Math.PI) / 180.0);\n const rightTan = Math.tan((fov.rightDegrees * Math.PI) / 180.0);\n const xScale = 2.0 / (leftTan + rightTan);\n const yScale = 2.0 / (upTan + downTan);\n const m = result._m;\n m[0] = xScale;\n m[1] = m[2] = m[3] = m[4] = 0.0;\n m[5] = yScale;\n m[6] = m[7] = 0.0;\n m[8] = (leftTan - rightTan) * xScale * 0.5;\n m[9] = -((upTan - downTan) * yScale * 0.5);\n m[10] = -zfar / (znear - zfar);\n m[11] = 1.0 * rightHandedFactor;\n m[12] = m[13] = m[15] = 0.0;\n m[14] = -(2.0 * zfar * znear) / (zfar - znear);\n _markAsUpdated(result);\n }\n Matrix.perspectiveFovWebVRToRef = perspectiveFovWebVRToRef;\n /**\n * Extracts a 2x2 matrix from a given matrix and store the result in a FloatArray\n * @param matrix - defines the matrix to use\n * @returns a new FloatArray array with 4 elements : the 2x2 matrix extracted from the given matrix\n */\n function GetAsMatrix2x2(matrix) {\n return [matrix._m[0], matrix._m[1], matrix._m[4], matrix._m[5]];\n }\n Matrix.GetAsMatrix2x2 = GetAsMatrix2x2;\n /**\n * Extracts a 3x3 matrix from a given matrix and store the result in a FloatArray\n * @param matrix - defines the matrix to use\n * @returns a new FloatArray array with 9 elements : the 3x3 matrix extracted from the given matrix\n */\n function GetAsMatrix3x3(matrix) {\n return [\n matrix._m[0],\n matrix._m[1],\n matrix._m[2],\n matrix._m[4],\n matrix._m[5],\n matrix._m[6],\n matrix._m[8],\n matrix._m[9],\n matrix._m[10]\n ];\n }\n Matrix.GetAsMatrix3x3 = GetAsMatrix3x3;\n /**\n * Compute the transpose of a given matrix\n * @param matrix - defines the matrix to transpose\n * @returns the new matrix\n */\n function transpose(matrix) {\n const result = create();\n transposeToRef(matrix, result);\n return result;\n }\n Matrix.transpose = transpose;\n /**\n * Compute the transpose of a matrix and store it in a target matrix\n * @param matrix - defines the matrix to transpose\n * @param result - defines the target matrix\n */\n function transposeToRef(matrix, result) {\n const rm = result._m;\n const mm = matrix._m;\n rm[0] = mm[0];\n rm[1] = mm[4];\n rm[2] = mm[8];\n rm[3] = mm[12];\n rm[4] = mm[1];\n rm[5] = mm[5];\n rm[6] = mm[9];\n rm[7] = mm[13];\n rm[8] = mm[2];\n rm[9] = mm[6];\n rm[10] = mm[10];\n rm[11] = mm[14];\n rm[12] = mm[3];\n rm[13] = mm[7];\n rm[14] = mm[11];\n rm[15] = mm[15];\n // identity-ness does not change when transposing\n _updateIdentityStatus(result, matrix.isIdentity, matrix._isIdentityDirty);\n }\n Matrix.transposeToRef = transposeToRef;\n /**\n * Computes a reflection matrix from a plane\n * @param plane - defines the reflection plane\n * @returns a new matrix\n */\n function reflection(plane) {\n const matrix = create();\n reflectionToRef(plane, matrix);\n return matrix;\n }\n Matrix.reflection = reflection;\n /**\n * Computes a reflection matrix from a plane\n * @param plane - defines the reflection plane\n * @param result - defines the target matrix\n */\n function reflectionToRef(_plane, result) {\n const plane = Plane.normalize(_plane);\n const x = plane.normal.x;\n const y = plane.normal.y;\n const z = plane.normal.z;\n const temp = -2 * x;\n const temp2 = -2 * y;\n const temp3 = -2 * z;\n fromValuesToRef(temp * x + 1, temp2 * x, temp3 * x, 0.0, temp * y, temp2 * y + 1, temp3 * y, 0.0, temp * z, temp2 * z, temp3 * z + 1, 0.0, temp * plane.d, temp2 * plane.d, temp3 * plane.d, 1.0, result);\n }\n Matrix.reflectionToRef = reflectionToRef;\n /**\n * Sets the given matrix as a rotation matrix composed from the 3 left handed axes\n * @param xaxis - defines the value of the 1st axis\n * @param yaxis - defines the value of the 2nd axis\n * @param zaxis - defines the value of the 3rd axis\n * @param result - defines the target matrix\n */\n function fromXYZAxesToRef(xaxis, yaxis, zaxis, result) {\n fromValuesToRef(xaxis.x, xaxis.y, xaxis.z, 0.0, yaxis.x, yaxis.y, yaxis.z, 0.0, zaxis.x, zaxis.y, zaxis.z, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n }\n Matrix.fromXYZAxesToRef = fromXYZAxesToRef;\n /**\n * Creates a rotation matrix from a quaternion and stores it in a target matrix\n * @param quat - defines the quaternion to use\n * @param result - defines the target matrix\n */\n function fromQuaternionToRef(quat, result) {\n const xx = quat.x * quat.x;\n const yy = quat.y * quat.y;\n const zz = quat.z * quat.z;\n const xy = quat.x * quat.y;\n const zw = quat.z * quat.w;\n const zx = quat.z * quat.x;\n const yw = quat.y * quat.w;\n const yz = quat.y * quat.z;\n const xw = quat.x * quat.w;\n result._m[0] = 1.0 - 2.0 * (yy + zz);\n result._m[1] = 2.0 * (xy + zw);\n result._m[2] = 2.0 * (zx - yw);\n result._m[3] = 0.0;\n result._m[4] = 2.0 * (xy - zw);\n result._m[5] = 1.0 - 2.0 * (zz + xx);\n result._m[6] = 2.0 * (yz + xw);\n result._m[7] = 0.0;\n result._m[8] = 2.0 * (zx + yw);\n result._m[9] = 2.0 * (yz - xw);\n result._m[10] = 1.0 - 2.0 * (yy + xx);\n result._m[11] = 0.0;\n result._m[12] = 0.0;\n result._m[13] = 0.0;\n result._m[14] = 0.0;\n result._m[15] = 1.0;\n _markAsUpdated(result);\n }\n Matrix.fromQuaternionToRef = fromQuaternionToRef;\n /** @internal */\n function _markAsUpdated(self) {\n self.updateFlag = _updateFlagSeed++;\n self.isIdentity = false;\n self.isIdentity3x2 = false;\n self._isIdentityDirty = true;\n self._isIdentity3x2Dirty = true;\n }\n // Properties\n /**\n * Check if the current matrix is identity\n * @returns true is the matrix is the identity matrix\n */\n function isIdentityUpdate(self) {\n if (self._isIdentityDirty) {\n self._isIdentityDirty = false;\n const m = self._m;\n self.isIdentity =\n m[0] === 1.0 &&\n m[1] === 0.0 &&\n m[2] === 0.0 &&\n m[3] === 0.0 &&\n m[4] === 0.0 &&\n m[5] === 1.0 &&\n m[6] === 0.0 &&\n m[7] === 0.0 &&\n m[8] === 0.0 &&\n m[9] === 0.0 &&\n m[10] === 1.0 &&\n m[11] === 0.0 &&\n m[12] === 0.0 &&\n m[13] === 0.0 &&\n m[14] === 0.0 &&\n m[15] === 1.0;\n }\n return self.isIdentity;\n }\n Matrix.isIdentityUpdate = isIdentityUpdate;\n /**\n * Check if the current matrix is identity as a texture matrix (3x2 store in 4x4)\n * @returns true is the matrix is the identity matrix\n */\n function isIdentityAs3x2Update(self) {\n if (self._isIdentity3x2Dirty) {\n self._isIdentity3x2Dirty = false;\n if (self._m[0] !== 1.0 || self._m[5] !== 1.0 || self._m[15] !== 1.0) {\n self.isIdentity3x2 = false;\n }\n else if (self._m[1] !== 0.0 ||\n self._m[2] !== 0.0 ||\n self._m[3] !== 0.0 ||\n self._m[4] !== 0.0 ||\n self._m[6] !== 0.0 ||\n self._m[7] !== 0.0 ||\n self._m[8] !== 0.0 ||\n self._m[9] !== 0.0 ||\n self._m[10] !== 0.0 ||\n self._m[11] !== 0.0 ||\n self._m[12] !== 0.0 ||\n self._m[13] !== 0.0 ||\n self._m[14] !== 0.0) {\n self.isIdentity3x2 = false;\n }\n else {\n self.isIdentity3x2 = true;\n }\n }\n return self.isIdentity3x2;\n }\n Matrix.isIdentityAs3x2Update = isIdentityAs3x2Update;\n /**\n * Gets the determinant of the matrix\n * @returns the matrix determinant\n */\n function determinant(self) {\n if (self.isIdentity === true) {\n return 1;\n }\n const m = self._m;\n // tslint:disable-next-line:one-variable-per-declaration\n const m00 = m[0], m01 = m[1], m02 = m[2], m03 = m[3];\n // tslint:disable-next-line:one-variable-per-declaration\n const m10 = m[4], m11 = m[5], m12 = m[6], m13 = m[7];\n // tslint:disable-next-line:one-variable-per-declaration\n const m20 = m[8], m21 = m[9], m22 = m[10], m23 = m[11];\n // tslint:disable-next-line:one-variable-per-declaration\n const m30 = m[12], m31 = m[13], m32 = m[14], m33 = m[15];\n /*\n // https://en.wikipedia.org/wiki/Laplace_expansion\n // to compute the deterrminant of a 4x4 Matrix we compute the cofactors of any row or column,\n // then we multiply each Cofactor by its corresponding matrix value and sum them all to get the determinant\n // Cofactor(i, j) = sign(i,j) * det(Minor(i, j))\n // where\n // - sign(i,j) = (i+j) % 2 === 0 ? 1 : -1\n // - Minor(i, j) is the 3x3 matrix we get by removing row i and column j from current Matrix\n //\n // Here we do that for the 1st row.\n */\n // tslint:disable:variable-name\n const det_22_33 = m22 * m33 - m32 * m23;\n const det_21_33 = m21 * m33 - m31 * m23;\n const det_21_32 = m21 * m32 - m31 * m22;\n const det_20_33 = m20 * m33 - m30 * m23;\n const det_20_32 = m20 * m32 - m22 * m30;\n const det_20_31 = m20 * m31 - m30 * m21;\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\n // tslint:enable:variable-name\n return m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\n }\n Matrix.determinant = determinant;\n // Methods\n /**\n * Returns the matrix as a FloatArray\n * @returns the matrix underlying array\n */\n function toArray(self) {\n return self._m;\n }\n Matrix.toArray = toArray;\n /**\n * Returns the matrix as a FloatArray\n * @returns the matrix underlying array.\n */\n function asArray(self) {\n return self._m;\n }\n Matrix.asArray = asArray;\n /**\n * Sets all the matrix elements to zero\n * @returns the current matrix\n */\n function reset(self) {\n fromValuesToRef(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, self);\n _updateIdentityStatus(self, false);\n }\n Matrix.reset = reset;\n /**\n * Adds the current matrix with a second one\n * @param other - defines the matrix to add\n * @returns a new matrix as the addition of the current matrix and the given one\n */\n function add(self, other) {\n const result = create();\n addToRef(self, other, result);\n return result;\n }\n Matrix.add = add;\n /**\n * Sets the given matrix \"result\" to the addition of the current matrix and the given one\n * @param other - defines the matrix to add\n * @param result - defines the target matrix\n * @returns the current matrix\n */\n function addToRef(self, other, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] = self._m[index] + other._m[index];\n }\n _markAsUpdated(result);\n }\n Matrix.addToRef = addToRef;\n /**\n * Adds in place the given matrix to the current matrix\n * @param other - defines the second operand\n * @returns the current updated matrix\n */\n function addToSelf(self, other) {\n for (let index = 0; index < 16; index++) {\n self._m[index] += other._m[index];\n }\n _markAsUpdated(self);\n }\n Matrix.addToSelf = addToSelf;\n /**\n * Creates a new matrix as the invert of a given matrix\n * @param source - defines the source matrix\n * @returns the new matrix\n */\n function invert(source) {\n const result = create();\n invertToRef(source, result);\n return result;\n }\n Matrix.invert = invert;\n /**\n * Sets the given matrix to the current inverted Matrix\n * @param other - defines the target matrix\n * @returns the unmodified current matrix\n */\n function invertToRef(source, result) {\n if (source.isIdentity === true) {\n copy(source, result);\n return;\n }\n // the inverse of a Matrix is the transpose of cofactor matrix divided by the determinant\n const m = source._m;\n // tslint:disable:one-variable-per-declaration\n const m00 = m[0], m01 = m[1], m02 = m[2], m03 = m[3];\n const m10 = m[4], m11 = m[5], m12 = m[6], m13 = m[7];\n const m20 = m[8], m21 = m[9], m22 = m[10], m23 = m[11];\n const m30 = m[12], m31 = m[13], m32 = m[14], m33 = m[15];\n // tslint:enable:one-variable-per-declaration\n // tslint:disable:variable-name\n const det_22_33 = m22 * m33 - m32 * m23;\n const det_21_33 = m21 * m33 - m31 * m23;\n const det_21_32 = m21 * m32 - m31 * m22;\n const det_20_33 = m20 * m33 - m30 * m23;\n const det_20_32 = m20 * m32 - m22 * m30;\n const det_20_31 = m20 * m31 - m30 * m21;\n const cofact_00 = +(m11 * det_22_33 - m12 * det_21_33 + m13 * det_21_32);\n const cofact_01 = -(m10 * det_22_33 - m12 * det_20_33 + m13 * det_20_32);\n const cofact_02 = +(m10 * det_21_33 - m11 * det_20_33 + m13 * det_20_31);\n const cofact_03 = -(m10 * det_21_32 - m11 * det_20_32 + m12 * det_20_31);\n const det = m00 * cofact_00 + m01 * cofact_01 + m02 * cofact_02 + m03 * cofact_03;\n if (det === 0) {\n copy(source, result);\n return;\n }\n const detInv = 1 / det;\n const det_12_33 = m12 * m33 - m32 * m13;\n const det_11_33 = m11 * m33 - m31 * m13;\n const det_11_32 = m11 * m32 - m31 * m12;\n const det_10_33 = m10 * m33 - m30 * m13;\n const det_10_32 = m10 * m32 - m30 * m12;\n const det_10_31 = m10 * m31 - m30 * m11;\n const det_12_23 = m12 * m23 - m22 * m13;\n const det_11_23 = m11 * m23 - m21 * m13;\n const det_11_22 = m11 * m22 - m21 * m12;\n const det_10_23 = m10 * m23 - m20 * m13;\n const det_10_22 = m10 * m22 - m20 * m12;\n const det_10_21 = m10 * m21 - m20 * m11;\n const cofact_10 = -(m01 * det_22_33 - m02 * det_21_33 + m03 * det_21_32);\n const cofact_11 = +(m00 * det_22_33 - m02 * det_20_33 + m03 * det_20_32);\n const cofact_12 = -(m00 * det_21_33 - m01 * det_20_33 + m03 * det_20_31);\n const cofact_13 = +(m00 * det_21_32 - m01 * det_20_32 + m02 * det_20_31);\n const cofact_20 = +(m01 * det_12_33 - m02 * det_11_33 + m03 * det_11_32);\n const cofact_21 = -(m00 * det_12_33 - m02 * det_10_33 + m03 * det_10_32);\n const cofact_22 = +(m00 * det_11_33 - m01 * det_10_33 + m03 * det_10_31);\n const cofact_23 = -(m00 * det_11_32 - m01 * det_10_32 + m02 * det_10_31);\n const cofact_30 = -(m01 * det_12_23 - m02 * det_11_23 + m03 * det_11_22);\n const cofact_31 = +(m00 * det_12_23 - m02 * det_10_23 + m03 * det_10_22);\n const cofact_32 = -(m00 * det_11_23 - m01 * det_10_23 + m03 * det_10_21);\n const cofact_33 = +(m00 * det_11_22 - m01 * det_10_22 + m02 * det_10_21);\n fromValuesToRef(cofact_00 * detInv, cofact_10 * detInv, cofact_20 * detInv, cofact_30 * detInv, cofact_01 * detInv, cofact_11 * detInv, cofact_21 * detInv, cofact_31 * detInv, cofact_02 * detInv, cofact_12 * detInv, cofact_22 * detInv, cofact_32 * detInv, cofact_03 * detInv, cofact_13 * detInv, cofact_23 * detInv, cofact_33 * detInv, result);\n // tslint:enable:variable-name\n }\n Matrix.invertToRef = invertToRef;\n /**\n * add a value at the specified position in the current Matrix\n * @param index - the index of the value within the matrix. between 0 and 15.\n * @param value - the value to be added\n * @returns the current updated matrix\n */\n function addAtIndex(self, index, value) {\n self._m[index] += value;\n _markAsUpdated(self);\n }\n Matrix.addAtIndex = addAtIndex;\n /**\n * mutiply the specified position in the current Matrix by a value\n * @param index - the index of the value within the matrix. between 0 and 15.\n * @param value - the value to be added\n * @returns the current updated matrix\n */\n function multiplyAtIndex(self, index, value) {\n self._m[index] *= value;\n _markAsUpdated(self);\n return self;\n }\n Matrix.multiplyAtIndex = multiplyAtIndex;\n /**\n * Inserts the translation vector (using 3 floats) in the current matrix\n * @param x - defines the 1st component of the translation\n * @param y - defines the 2nd component of the translation\n * @param z - defines the 3rd component of the translation\n * @returns the current updated matrix\n */\n function setTranslationFromFloats(self, x, y, z) {\n self._m[12] = x;\n self._m[13] = y;\n self._m[14] = z;\n _markAsUpdated(self);\n }\n Matrix.setTranslationFromFloats = setTranslationFromFloats;\n /**\n * Inserts the translation vector in the current matrix\n * @param vector3 - defines the translation to insert\n * @returns the current updated matrix\n */\n function setTranslation(self, vector3) {\n setTranslationFromFloats(self, vector3.x, vector3.y, vector3.z);\n }\n Matrix.setTranslation = setTranslation;\n /**\n * Gets the translation value of the current matrix\n * @returns a new Vector3 as the extracted translation from the matrix\n */\n function getTranslation(self) {\n return Vector3.create(self._m[12], self._m[13], self._m[14]);\n }\n Matrix.getTranslation = getTranslation;\n /**\n * Fill a Vector3 with the extracted translation from the matrix\n * @param result - defines the Vector3 where to store the translation\n * @returns the current matrix\n */\n function getTranslationToRef(self, result) {\n result.x = self._m[12];\n result.y = self._m[13];\n result.z = self._m[14];\n }\n Matrix.getTranslationToRef = getTranslationToRef;\n /**\n * Remove rotation and scaling part from the matrix\n * @returns the updated matrix\n */\n function removeRotationAndScaling(self) {\n const m = self._m;\n fromValuesToRef(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, m[12], m[13], m[14], m[15], self);\n _updateIdentityStatus(self, m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1);\n return self;\n }\n Matrix.removeRotationAndScaling = removeRotationAndScaling;\n /**\n * Multiply two matrices\n * @param other - defines the second operand\n * @returns a new matrix set with the multiplication result of the current Matrix and the given one\n */\n function multiply(self, other) {\n const result = create();\n multiplyToRef(self, other, result);\n return result;\n }\n Matrix.multiply = multiply;\n /**\n * Copy the current matrix from the given one\n * @param other - defines the source matrix\n * @returns the current updated matrix\n */\n function copy(from, dest) {\n copyToArray(from, dest._m);\n _updateIdentityStatus(dest, from.isIdentity, from._isIdentityDirty, from.isIdentity3x2, from._isIdentity3x2Dirty);\n }\n Matrix.copy = copy;\n /**\n * Populates the given array from the starting index with the current matrix values\n * @param array - defines the target array\n * @param offset - defines the offset in the target array where to start storing values\n * @returns the current matrix\n */\n function copyToArray(self, arrayDest, offsetDest = 0) {\n for (let index = 0; index < 16; index++) {\n arrayDest[offsetDest + index] = self._m[index];\n }\n }\n Matrix.copyToArray = copyToArray;\n /**\n * Sets the given matrix \"result\" with the multiplication result of the current Matrix and the given one\n * @param other - defines the second operand\n * @param result - defines the matrix where to store the multiplication\n * @returns the current matrix\n */\n function multiplyToRef(self, other, result) {\n if (self.isIdentity) {\n copy(other, result);\n return;\n }\n if (other.isIdentity) {\n copy(self, result);\n return;\n }\n multiplyToArray(self, other, result._m, 0);\n _markAsUpdated(result);\n }\n Matrix.multiplyToRef = multiplyToRef;\n /**\n * Sets the FloatArray \"result\" from the given index \"offset\" with the multiplication of the current matrix and the given one\n * @param other - defines the second operand\n * @param result - defines the array where to store the multiplication\n * @param offset - defines the offset in the target array where to start storing values\n * @returns the current matrix\n */\n function multiplyToArray(self, other, result, offset) {\n const m = self._m;\n const otherM = other._m;\n // tslint:disable:one-variable-per-declaration\n const tm0 = m[0], tm1 = m[1], tm2 = m[2], tm3 = m[3];\n const tm4 = m[4], tm5 = m[5], tm6 = m[6], tm7 = m[7];\n const tm8 = m[8], tm9 = m[9], tm10 = m[10], tm11 = m[11];\n const tm12 = m[12], tm13 = m[13], tm14 = m[14], tm15 = m[15];\n const om0 = otherM[0], om1 = otherM[1], om2 = otherM[2], om3 = otherM[3];\n const om4 = otherM[4], om5 = otherM[5], om6 = otherM[6], om7 = otherM[7];\n const om8 = otherM[8], om9 = otherM[9], om10 = otherM[10], om11 = otherM[11];\n const om12 = otherM[12], om13 = otherM[13], om14 = otherM[14], om15 = otherM[15];\n // tslint:enable:one-variable-per-declaration\n result[offset] = tm0 * om0 + tm1 * om4 + tm2 * om8 + tm3 * om12;\n result[offset + 1] = tm0 * om1 + tm1 * om5 + tm2 * om9 + tm3 * om13;\n result[offset + 2] = tm0 * om2 + tm1 * om6 + tm2 * om10 + tm3 * om14;\n result[offset + 3] = tm0 * om3 + tm1 * om7 + tm2 * om11 + tm3 * om15;\n result[offset + 4] = tm4 * om0 + tm5 * om4 + tm6 * om8 + tm7 * om12;\n result[offset + 5] = tm4 * om1 + tm5 * om5 + tm6 * om9 + tm7 * om13;\n result[offset + 6] = tm4 * om2 + tm5 * om6 + tm6 * om10 + tm7 * om14;\n result[offset + 7] = tm4 * om3 + tm5 * om7 + tm6 * om11 + tm7 * om15;\n result[offset + 8] = tm8 * om0 + tm9 * om4 + tm10 * om8 + tm11 * om12;\n result[offset + 9] = tm8 * om1 + tm9 * om5 + tm10 * om9 + tm11 * om13;\n result[offset + 10] = tm8 * om2 + tm9 * om6 + tm10 * om10 + tm11 * om14;\n result[offset + 11] = tm8 * om3 + tm9 * om7 + tm10 * om11 + tm11 * om15;\n result[offset + 12] = tm12 * om0 + tm13 * om4 + tm14 * om8 + tm15 * om12;\n result[offset + 13] = tm12 * om1 + tm13 * om5 + tm14 * om9 + tm15 * om13;\n result[offset + 14] = tm12 * om2 + tm13 * om6 + tm14 * om10 + tm15 * om14;\n result[offset + 15] = tm12 * om3 + tm13 * om7 + tm14 * om11 + tm15 * om15;\n }\n Matrix.multiplyToArray = multiplyToArray;\n /**\n * Check equality between self matrix and a second one\n * @param value - defines the second matrix to compare\n * @returns true is the current matrix and the given one values are strictly equal\n */\n function equals(self, value) {\n const other = value;\n if (!other) {\n return false;\n }\n if (self.isIdentity || other.isIdentity) {\n if (!self._isIdentityDirty && !other._isIdentityDirty) {\n return self.isIdentity && other.isIdentity;\n }\n }\n const m = self._m;\n const om = other._m;\n return (m[0] === om[0] &&\n m[1] === om[1] &&\n m[2] === om[2] &&\n m[3] === om[3] &&\n m[4] === om[4] &&\n m[5] === om[5] &&\n m[6] === om[6] &&\n m[7] === om[7] &&\n m[8] === om[8] &&\n m[9] === om[9] &&\n m[10] === om[10] &&\n m[11] === om[11] &&\n m[12] === om[12] &&\n m[13] === om[13] &&\n m[14] === om[14] &&\n m[15] === om[15]);\n }\n Matrix.equals = equals;\n /**\n * Clone the current matrix\n * @returns a new matrix from the current matrix\n */\n function clone(self) {\n const result = create();\n copy(self, result);\n return result;\n }\n Matrix.clone = clone;\n /**\n * Gets the hash code of the current matrix\n * @returns the hash code\n */\n function getHashCode(self) {\n let hash = self._m[0] || 0;\n for (let i = 1; i < 16; i++) {\n hash = (hash * 397) ^ (self._m[i] || 0);\n }\n return hash;\n }\n Matrix.getHashCode = getHashCode;\n /**\n * Decomposes the current Matrix into a translation, rotation and scaling components\n * @param scale - defines the scale vector3 given as a reference to update\n * @param rotation - defines the rotation quaternion given as a reference to update\n * @param translation - defines the translation vector3 given as a reference to update\n * @returns true if operation was successful\n */\n function decompose(self, scale, rotation, translation) {\n if (self.isIdentity) {\n if (translation) {\n translation.x = 0;\n translation.y = 0;\n translation.z = 0;\n }\n if (scale) {\n scale.x = 1;\n scale.y = 1;\n scale.z = 1;\n }\n if (rotation) {\n rotation.w = 1;\n rotation.x = 0;\n rotation.y = 0;\n rotation.z = 0;\n }\n return true;\n }\n const m = self._m;\n if (translation) {\n translation.x = m[12];\n translation.y = m[13];\n translation.z = m[14];\n }\n const usedScale = scale || Vector3.Zero();\n usedScale.x = Math.sqrt(m[0] * m[0] + m[1] * m[1] + m[2] * m[2]);\n usedScale.y = Math.sqrt(m[4] * m[4] + m[5] * m[5] + m[6] * m[6]);\n usedScale.z = Math.sqrt(m[8] * m[8] + m[9] * m[9] + m[10] * m[10]);\n if (determinant(self) <= 0) {\n usedScale.y *= -1;\n }\n if (usedScale.x === 0 || usedScale.y === 0 || usedScale.z === 0) {\n if (rotation) {\n rotation.w = 1;\n rotation.x = 0;\n rotation.y = 0;\n rotation.z = 0;\n }\n return false;\n }\n if (rotation) {\n // tslint:disable-next-line:one-variable-per-declaration\n const sx = 1 / usedScale.x, sy = 1 / usedScale.y, sz = 1 / usedScale.z;\n const tmpMatrix = create();\n fromValuesToRef(m[0] * sx, m[1] * sx, m[2] * sx, 0.0, m[4] * sy, m[5] * sy, m[6] * sy, 0.0, m[8] * sz, m[9] * sz, m[10] * sz, 0.0, 0.0, 0.0, 0.0, 1.0, tmpMatrix);\n Quaternion.fromRotationMatrixToRef(tmpMatrix, rotation);\n }\n return true;\n }\n Matrix.decompose = decompose;\n /**\n * Gets specific row of the matrix\n * @param index - defines the number of the row to get\n * @returns the index-th row of the current matrix as a new Vector4\n */\n // TODO\n // export function getRow(index: number): Nullable {\n // if (index < 0 || index > 3) {\n // return null\n // }\n // const i = index * 4\n // return new Vector4(\n // self._m[i + 0],\n // self._m[i + 1],\n // self._m[i + 2],\n // self._m[i + 3]\n // )\n // }\n /**\n * Sets the index-th row of the current matrix to the vector4 values\n * @param index - defines the number of the row to set\n * @param row - defines the target vector4\n * @returns the updated current matrix\n */\n // TODO\n // export function setRow(index: number, row: Vector4): MutableMatrix {\n // return setRowFromFloats(index, row.x, row.y, row.z, row.w)\n // }\n /**\n * Sets the index-th row of the current matrix with the given 4 x float values\n * @param index - defines the row index\n * @param x - defines the x component to set\n * @param y - defines the y component to set\n * @param z - defines the z component to set\n * @param w - defines the w component to set\n * @returns the updated current matrix\n */\n function setRowFromFloats(self, index, x, y, z, w) {\n if (index < 0 || index > 3) {\n return;\n }\n const i = index * 4;\n self._m[i + 0] = x;\n self._m[i + 1] = y;\n self._m[i + 2] = z;\n self._m[i + 3] = w;\n _markAsUpdated(self);\n }\n Matrix.setRowFromFloats = setRowFromFloats;\n /**\n * Compute a new matrix set with the current matrix values multiplied by scale (float)\n * @param scale - defines the scale factor\n * @returns a new matrix\n */\n function scale(self, scale) {\n const result = create();\n scaleToRef(self, scale, result);\n return result;\n }\n Matrix.scale = scale;\n /**\n * Scale the current matrix values by a factor to a given result matrix\n * @param scale - defines the scale factor\n * @param result - defines the matrix to store the result\n * @returns the current matrix\n */\n function scaleToRef(self, scale, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] = self._m[index] * scale;\n }\n _markAsUpdated(result);\n }\n Matrix.scaleToRef = scaleToRef;\n /**\n * Scale the current matrix values by a factor and add the result to a given matrix\n * @param scale - defines the scale factor\n * @param result - defines the Matrix to store the result\n * @returns the current matrix\n */\n function scaleAndAddToRef(self, scale, result) {\n for (let index = 0; index < 16; index++) {\n result._m[index] += self._m[index] * scale;\n }\n _markAsUpdated(result);\n }\n Matrix.scaleAndAddToRef = scaleAndAddToRef;\n /**\n * Writes to the given matrix a normal matrix, computed from self one (using values from identity matrix for fourth row and column).\n * @param ref - matrix to store the result\n */\n function normalMatrixToRef(self, ref) {\n const tmp = create();\n invertToRef(self, tmp);\n transposeToRef(tmp, ref);\n const m = ref._m;\n fromValuesToRef(m[0], m[1], m[2], 0.0, m[4], m[5], m[6], 0.0, m[8], m[9], m[10], 0.0, 0.0, 0.0, 0.0, 1.0, ref);\n }\n Matrix.normalMatrixToRef = normalMatrixToRef;\n /**\n * Gets only rotation part of the current matrix\n * @returns a new matrix sets to the extracted rotation matrix from the current one\n */\n function getRotationMatrix(self) {\n const result = create();\n getRotationMatrixToRef(self, result);\n return result;\n }\n Matrix.getRotationMatrix = getRotationMatrix;\n /**\n * Extracts the rotation matrix from the current one and sets it as the given \"result\"\n * @param result - defines the target matrix to store data to\n * @returns the current matrix\n */\n function getRotationMatrixToRef(self, result) {\n const scale = Vector3.Zero();\n if (!decompose(self, scale)) {\n result = Identity();\n return;\n }\n const m = self._m;\n // tslint:disable-next-line:one-variable-per-declaration\n const sx = 1 / scale.x, sy = 1 / scale.y, sz = 1 / scale.z;\n fromValuesToRef(m[0] * sx, m[1] * sx, m[2] * sx, 0.0, m[4] * sy, m[5] * sy, m[6] * sy, 0.0, m[8] * sz, m[9] * sz, m[10] * sz, 0.0, 0.0, 0.0, 0.0, 1.0, result);\n }\n Matrix.getRotationMatrixToRef = getRotationMatrixToRef;\n /**\n * Toggles model matrix from being right handed to left handed in place and vice versa\n */\n function toggleModelMatrixHandInPlace(self) {\n self._m[2] *= -1;\n self._m[6] *= -1;\n self._m[8] *= -1;\n self._m[9] *= -1;\n self._m[14] *= -1;\n _markAsUpdated(self);\n }\n Matrix.toggleModelMatrixHandInPlace = toggleModelMatrixHandInPlace;\n /**\n * Toggles projection matrix from being right handed to left handed in place and vice versa\n */\n function toggleProjectionMatrixHandInPlace(self) {\n self._m[8] *= -1;\n self._m[9] *= -1;\n self._m[10] *= -1;\n self._m[11] *= -1;\n _markAsUpdated(self);\n }\n Matrix.toggleProjectionMatrixHandInPlace = toggleProjectionMatrixHandInPlace;\n /** @internal */\n function _updateIdentityStatus(self, isIdentity, isIdentityDirty = false, isIdentity3x2 = false, isIdentity3x2Dirty = true) {\n self.updateFlag = _updateFlagSeed++;\n self.isIdentity = isIdentity;\n self.isIdentity3x2 = isIdentity || isIdentity3x2;\n self._isIdentityDirty = self.isIdentity ? false : isIdentityDirty;\n self._isIdentity3x2Dirty = self.isIdentity3x2 ? false : isIdentity3x2Dirty;\n }\n})(Matrix || (Matrix = {}));\n", "import { Vector3 } from './Vector3';\nimport { Scalar } from './Scalar';\nimport { DEG2RAD, RAD2DEG } from './types';\nimport { Matrix } from './Matrix';\n/**\n * @public\n * Quaternion is a type and a namespace.\n * ```\n * // The namespace contains all types and functions to operates with Quaternion\n * const next = Quaternion.add(pointA, velocityA)\n * // The type Quaternion is an alias to Quaternion.ReadonlyQuaternion\n * const readonlyRotation: Quaternion = Quaternion.Zero()\n * readonlyRotation.x = 0.1 // this FAILS\n *\n * // For mutable usage, use `Quaternion.Mutable`\n * const rotation: Quaternion.Mutable = Quaternion.Identity()\n * rotation.x = 3.0 // this WORKS\n * ```\n */\nexport var Quaternion;\n(function (Quaternion) {\n /**\n * Creates a new Quaternion from the given floats\n * @param x - defines the first component (0 by default)\n * @param y - defines the second component (0 by default)\n * @param z - defines the third component (0 by default)\n * @param w - defines the fourth component (1.0 by default)\n */\n function create(\n /** defines the first component (0 by default) */\n x = 0.0, \n /** defines the second component (0 by default) */\n y = 0.0, \n /** defines the third component (0 by default) */\n z = 0.0, \n /** defines the fourth component (1.0 by default) */\n w = 1.0) {\n return { x, y, z, w };\n }\n Quaternion.create = create;\n /**\n * Returns a new Quaternion as the result of the addition of the two given quaternions.\n * @param q1 - the first quaternion\n * @param q2 - the second quaternion\n * @returns the resulting quaternion\n */\n function add(q1, q2) {\n return { x: q1.x + q2.x, y: q1.y + q2.y, z: q1.z + q2.z, w: q1.w + q2.w };\n }\n Quaternion.add = add;\n /**\n * Creates a new rotation from the given Euler float angles (y, x, z) and stores it in the target quaternion\n * @param yaw - defines the rotation around Y axis (radians)\n * @param pitch - defines the rotation around X axis (radians)\n * @param roll - defines the rotation around Z axis (radians)\n * @returns result quaternion\n */\n function fromRotationYawPitchRoll(yaw, pitch, roll) {\n // Implemented unity-based calculations from: https://stackoverflow.com/a/56055813\n const halfPitch = pitch * 0.5;\n const halfYaw = yaw * 0.5;\n const halfRoll = roll * 0.5;\n const c1 = Math.cos(halfPitch);\n const c2 = Math.cos(halfYaw);\n const c3 = Math.cos(halfRoll);\n const s1 = Math.sin(halfPitch);\n const s2 = Math.sin(halfYaw);\n const s3 = Math.sin(halfRoll);\n return create(c2 * s1 * c3 + s2 * c1 * s3, s2 * c1 * c3 - c2 * s1 * s3, c2 * c1 * s3 - s2 * s1 * c3, c2 * c1 * c3 + s2 * s1 * s3);\n }\n Quaternion.fromRotationYawPitchRoll = fromRotationYawPitchRoll;\n /**\n * Returns a rotation that rotates z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis.\n * @param x - the rotation on the x axis in euler degrees\n * @param y - the rotation on the y axis in euler degrees\n * @param z - the rotation on the z axis in euler degrees\n */\n function fromEulerDegrees(x, y, z) {\n return fromRotationYawPitchRoll(y * DEG2RAD, x * DEG2RAD, z * DEG2RAD);\n }\n Quaternion.fromEulerDegrees = fromEulerDegrees;\n /**\n * Gets length of current quaternion\n * @returns the quaternion length (float)\n */\n function length(q) {\n return Math.sqrt(lengthSquared(q));\n }\n Quaternion.length = length;\n /**\n * Gets length of current quaternion\n * @returns the quaternion length (float)\n */\n function lengthSquared(q) {\n return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w;\n }\n Quaternion.lengthSquared = lengthSquared;\n /**\n * Returns the dot product (float) between the quaternions \"left\" and \"right\"\n * @param left - defines the left operand\n * @param right - defines the right operand\n * @returns the dot product\n */\n function dot(left, right) {\n return (left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w);\n }\n Quaternion.dot = dot;\n /**\n * Returns the angle in degrees between two rotations a and b.\n * @param quat1 - defines the first quaternion\n * @param quat2 - defines the second quaternion\n * @returns the degrees angle\n */\n function angle(quat1, quat2) {\n const dotVal = dot(quat1, quat2);\n return Math.acos(Math.min(Math.abs(dotVal), 1)) * 2 * RAD2DEG;\n }\n Quaternion.angle = angle;\n /**\n * The from quaternion is rotated towards to by an angular step of maxDegreesDelta.\n * @param from - defines the first quaternion\n * @param to - defines the second quaternion\n * @param maxDegreesDelta - the interval step\n */\n function rotateTowards(from, to, maxDegreesDelta) {\n const num = angle(from, to);\n if (num === 0) {\n return to;\n }\n const t = Math.min(1, maxDegreesDelta / num);\n return slerp(from, to, t);\n }\n Quaternion.rotateTowards = rotateTowards;\n /**\n * Creates a rotation with the specified forward and upwards directions.\n * @param forward - the direction to look in\n * @param up - the vector that defines in which direction up is\n */\n function lookRotation(forward, up = { x: 0.0, y: 1.0, z: 0.0 }) {\n const forwardNew = Vector3.normalize(forward);\n const right = Vector3.normalize(Vector3.cross(up, forwardNew));\n const upNew = Vector3.cross(forwardNew, right);\n const m00 = right.x;\n const m01 = right.y;\n const m02 = right.z;\n const m10 = upNew.x;\n const m11 = upNew.y;\n const m12 = upNew.z;\n const m20 = forwardNew.x;\n const m21 = forwardNew.y;\n const m22 = forwardNew.z;\n const num8 = m00 + m11 + m22;\n const quaternion = create();\n if (num8 > 0) {\n let num = Math.sqrt(num8 + 1);\n quaternion.w = num * 0.5;\n num = 0.5 / num;\n quaternion.x = (m12 - m21) * num;\n quaternion.y = (m20 - m02) * num;\n quaternion.z = (m01 - m10) * num;\n return quaternion;\n }\n if (m00 >= m11 && m00 >= m22) {\n const num7 = Math.sqrt(1 + m00 - m11 - m22);\n const num4 = 0.5 / num7;\n quaternion.x = 0.5 * num7;\n quaternion.y = (m01 + m10) * num4;\n quaternion.z = (m02 + m20) * num4;\n quaternion.w = (m12 - m21) * num4;\n return quaternion;\n }\n if (m11 > m22) {\n const num6 = Math.sqrt(1 + m11 - m00 - m22);\n const num3 = 0.5 / num6;\n quaternion.x = (m10 + m01) * num3;\n quaternion.y = 0.5 * num6;\n quaternion.z = (m21 + m12) * num3;\n quaternion.w = (m20 - m02) * num3;\n return quaternion;\n }\n const num5 = Math.sqrt(1 + m22 - m00 - m11);\n const num2 = 0.5 / num5;\n quaternion.x = (m20 + m02) * num2;\n quaternion.y = (m21 + m12) * num2;\n quaternion.z = 0.5 * num5;\n quaternion.w = (m01 - m10) * num2;\n return quaternion;\n }\n Quaternion.lookRotation = lookRotation;\n /**\n * Normalize in place the current quaternion\n * @returns the current updated quaternion\n */\n function normalize(q) {\n const qLength = 1.0 / length(q);\n return create(q.x * qLength, q.y * qLength, q.z * qLength, q.w * qLength);\n }\n Quaternion.normalize = normalize;\n /**\n * Creates a rotation which rotates from fromDirection to toDirection.\n * @param from - defines the first direction Vector\n * @param to - defines the target direction Vector\n */\n function fromToRotation(from, to, up = Vector3.Up()) {\n // Unity-based calculations implemented from https://forum.unity.com/threads/quaternion-lookrotation-around-an-axis.608470/#post-4069888\n const v0 = Vector3.normalize(from);\n const v1 = Vector3.normalize(to);\n const a = Vector3.cross(v0, v1);\n const w = Math.sqrt(Vector3.lengthSquared(v0) * Vector3.lengthSquared(v1)) +\n Vector3.dot(v0, v1);\n if (Vector3.lengthSquared(a) < 0.0001) {\n // the vectors are parallel, check w to find direction\n // if w is 0 then values are opposite, and we sould rotate 180 degrees around the supplied axis\n // otherwise the vectors in the same direction and no rotation should occur\n return Math.abs(w) < 0.0001\n ? normalize(create(up.x, up.y, up.z, 0))\n : Identity();\n }\n else {\n return normalize(create(a.x, a.y, a.z, w));\n }\n }\n Quaternion.fromToRotation = fromToRotation;\n /**\n * Creates an identity quaternion\n * @returns - the identity quaternion\n */\n function Identity() {\n return create(0.0, 0.0, 0.0, 1.0);\n }\n Quaternion.Identity = Identity;\n /**\n * Gets or sets the euler angle representation of the rotation.\n * Implemented unity-based calculations from: https://stackoverflow.com/a/56055813\n * @public\n * @returns a new Vector3 with euler angles degrees\n */\n function toEulerAngles(q) {\n const out = Vector3.create();\n // if the input quaternion is normalized, this is exactly one. Otherwise, this acts as a correction factor for the quaternion's not-normalizedness\n const unit = q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w;\n // q will have a magnitude of 0.5 or greater if and only if q is a singularity case\n const test = q.x * q.w - q.y * q.z;\n if (test > 0.4995 * unit) {\n // singularity at north pole\n out.x = Math.PI / 2;\n out.y = 2 * Math.atan2(q.y, q.x);\n out.z = 0;\n }\n else if (test < -0.4995 * unit) {\n // singularity at south pole\n out.x = -Math.PI / 2;\n out.y = -2 * Math.atan2(q.y, q.x);\n out.z = 0;\n }\n else {\n // no singularity - q is the majority of cases\n out.x = Math.asin(2 * (q.w * q.x - q.y * q.z));\n out.y = Math.atan2(2 * q.w * q.y + 2 * q.z * q.x, 1 - 2 * (q.x * q.x + q.y * q.y));\n out.z = Math.atan2(2 * q.w * q.z + 2 * q.x * q.y, 1 - 2 * (q.z * q.z + q.x * q.x));\n }\n out.x *= RAD2DEG;\n out.y *= RAD2DEG;\n out.z *= RAD2DEG;\n // ensure the degree values are between 0 and 360\n out.x = Scalar.repeat(out.x, 360);\n out.y = Scalar.repeat(out.y, 360);\n out.z = Scalar.repeat(out.z, 360);\n return out;\n }\n Quaternion.toEulerAngles = toEulerAngles;\n /**\n * Creates a new rotation from the given Euler float angles (y, x, z) and stores it in the target quaternion\n * @param yaw - defines the rotation around Y axis (radians)\n * @param pitch - defines the rotation around X axis (radians)\n * @param roll - defines the rotation around Z axis (radians)\n * @param result - defines the target quaternion\n */\n function fromRotationYawPitchRollToRef(yaw, pitch, roll, result) {\n // Implemented unity-based calculations from: https://stackoverflow.com/a/56055813\n const halfPitch = pitch * 0.5;\n const halfYaw = yaw * 0.5;\n const halfRoll = roll * 0.5;\n const c1 = Math.cos(halfPitch);\n const c2 = Math.cos(halfYaw);\n const c3 = Math.cos(halfRoll);\n const s1 = Math.sin(halfPitch);\n const s2 = Math.sin(halfYaw);\n const s3 = Math.sin(halfRoll);\n result.x = c2 * s1 * c3 + s2 * c1 * s3;\n result.y = s2 * c1 * c3 - c2 * s1 * s3;\n result.z = c2 * c1 * s3 - s2 * s1 * c3;\n result.w = c2 * c1 * c3 + s2 * s1 * s3;\n }\n Quaternion.fromRotationYawPitchRollToRef = fromRotationYawPitchRollToRef;\n /**\n * Updates the given quaternion with the given rotation matrix values\n * @param matrix - defines the source matrix\n * @param result - defines the target quaternion\n */\n function fromRotationMatrixToRef(matrix, result) {\n const data = matrix._m;\n // tslint:disable:one-variable-per-declaration\n const m11 = data[0], m12 = data[4], m13 = data[8];\n const m21 = data[1], m22 = data[5], m23 = data[9];\n const m31 = data[2], m32 = data[6], m33 = data[10];\n // tslint:enable:one-variable-per-declaration\n const trace = m11 + m22 + m33;\n let s;\n if (trace > 0) {\n s = 0.5 / Math.sqrt(trace + 1.0);\n result.w = 0.25 / s;\n result.x = (m32 - m23) * s;\n result.y = (m13 - m31) * s;\n result.z = (m21 - m12) * s;\n }\n else if (m11 > m22 && m11 > m33) {\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n result.w = (m32 - m23) / s;\n result.x = 0.25 * s;\n result.y = (m12 + m21) / s;\n result.z = (m13 + m31) / s;\n }\n else if (m22 > m33) {\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n result.w = (m13 - m31) / s;\n result.x = (m12 + m21) / s;\n result.y = 0.25 * s;\n result.z = (m23 + m32) / s;\n }\n else {\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n result.w = (m21 - m12) / s;\n result.x = (m13 + m31) / s;\n result.y = (m23 + m32) / s;\n result.z = 0.25 * s;\n }\n }\n Quaternion.fromRotationMatrixToRef = fromRotationMatrixToRef;\n /**\n * Interpolates between two quaternions\n * @param left - defines first quaternion\n * @param right - defines second quaternion\n * @param amount - defines the gradient to use\n * @returns the new interpolated quaternion\n */\n function slerp(left, right, amount) {\n const result = Quaternion.Identity();\n Quaternion.slerpToRef(left, right, amount, result);\n return result;\n }\n Quaternion.slerp = slerp;\n /**\n * Interpolates between two quaternions and stores it into a target quaternion\n * @param left - defines first quaternion\n * @param right - defines second quaternion\n * @param amount - defines the gradient to use\n * @param result - defines the target quaternion\n */\n function slerpToRef(left, right, amount, result) {\n let num2;\n let num3;\n let num4 = left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w;\n let flag = false;\n if (num4 < 0) {\n flag = true;\n num4 = -num4;\n }\n if (num4 > 0.999999) {\n num3 = 1 - amount;\n num2 = flag ? -amount : amount;\n }\n else {\n const num5 = Math.acos(num4);\n const num6 = 1.0 / Math.sin(num5);\n num3 = Math.sin((1.0 - amount) * num5) * num6;\n num2 = flag\n ? -Math.sin(amount * num5) * num6\n : Math.sin(amount * num5) * num6;\n }\n result.x = num3 * left.x + num2 * right.x;\n result.y = num3 * left.y + num2 * right.y;\n result.z = num3 * left.z + num2 * right.z;\n result.w = num3 * left.w + num2 * right.w;\n }\n Quaternion.slerpToRef = slerpToRef;\n /**\n * Multiplies two quaternions\n * @param self - defines the first operand\n * @param q1 - defines the second operand\n * @returns a new quaternion set as the multiplication result of the self one with the given one \"q1\"\n */\n function multiply(self, q1) {\n const result = create(0, 0, 0, 1.0);\n multiplyToRef(self, q1, result);\n return result;\n }\n Quaternion.multiply = multiply;\n /**\n * Sets the given \"result\" as the the multiplication result of the self one with the given one \"q1\"\n * @param self - defines the first operand\n * @param q1 - defines the second operand\n * @param result - defines the target quaternion\n * @returns the current quaternion\n */\n function multiplyToRef(self, q1, result) {\n result.x = self.x * q1.w + self.y * q1.z - self.z * q1.y + self.w * q1.x;\n result.y = -self.x * q1.z + self.y * q1.w + self.z * q1.x + self.w * q1.y;\n result.z = self.x * q1.y - self.y * q1.x + self.z * q1.w + self.w * q1.z;\n result.w = -self.x * q1.x - self.y * q1.y - self.z * q1.z + self.w * q1.w;\n }\n Quaternion.multiplyToRef = multiplyToRef;\n /**\n *\n * @param degrees - the angle degrees\n * @param axis - vector3\n * @returns a new Quaternion\n */\n function fromAngleAxis(degrees, axis) {\n if (Vector3.lengthSquared(axis) === 0) {\n return Quaternion.Identity();\n }\n const result = Identity();\n let radians = degrees * DEG2RAD;\n radians *= 0.5;\n const a2 = Vector3.normalize(axis);\n Vector3.scaleToRef(a2, Math.sin(radians), a2);\n result.x = a2.x;\n result.y = a2.y;\n result.z = a2.z;\n result.w = Math.cos(radians);\n return normalize(result);\n }\n Quaternion.fromAngleAxis = fromAngleAxis;\n /**\n * Creates a new quaternion containing the rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation)\n * @param axis1 - defines the first axis\n * @param axis2 - defines the second axis\n * @param axis3 - defines the third axis\n * @returns the new quaternion\n */\n function fromAxisToRotationQuaternion(axis1, axis2, axis3) {\n const quat = Quaternion.create(0.0, 0.0, 0.0, 0.0);\n fromAxisToRotationQuaternionToRef(axis1, axis2, axis3, quat);\n return quat;\n }\n Quaternion.fromAxisToRotationQuaternion = fromAxisToRotationQuaternion;\n /**\n * Creates a rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation) and stores it in the target quaternion\n * @param axis1 - defines the first axis\n * @param axis2 - defines the second axis\n * @param axis3 - defines the third axis\n * @param ref - defines the target quaternion\n */\n function fromAxisToRotationQuaternionToRef(axis1, axis2, axis3, ref) {\n const rotMat = Matrix.create();\n Matrix.fromXYZAxesToRef(Vector3.normalize(axis1), Vector3.normalize(axis2), Vector3.normalize(axis3), rotMat);\n Quaternion.fromRotationMatrixToRef(rotMat, ref);\n }\n Quaternion.fromAxisToRotationQuaternionToRef = fromAxisToRotationQuaternionToRef;\n /**\n * Returns a zero filled quaternion\n */\n function Zero() {\n return create(0.0, 0.0, 0.0, 0.0);\n }\n Quaternion.Zero = Zero;\n /**\n * @public\n * Rotates the transform so the forward vector points at target's current position.\n */\n function fromLookAt(position, target, worldUp = Vector3.Up()) {\n const result = Quaternion.Identity();\n fromLookAtToRef(position, target, worldUp, result);\n return result;\n }\n Quaternion.fromLookAt = fromLookAt;\n /**\n * @public\n * Rotates the transform so the forward vector points at target's current position.\n */\n function fromLookAtToRef(position, target, worldUp = Vector3.Up(), result) {\n const m = Matrix.Identity();\n Matrix.lookAtLHToRef(position, target, worldUp, m);\n Matrix.invertToRef(m, m);\n Quaternion.fromRotationMatrixToRef(m, result);\n }\n Quaternion.fromLookAtToRef = fromLookAtToRef;\n})(Quaternion || (Quaternion = {}));\n", "import { Scalar } from './Scalar';\nimport { ToLinearSpace, ToGammaSpace } from './types';\n/**\n * @public\n * Color4 is a type and a namespace.\n * ```\n * // The namespace contains all types and functions to operates with Color4\n * Color4.add(blue, red) // sum component by component resulting pink\n * // The type Color4 is an alias to Color4.ReadonlyColor4\n * const readonlyBlue: Color4 = Color4.Blue()\n * readonlyBlue.a = 0.1 // this FAILS\n *\n * // For mutable usage, use `Color4.Mutable`\n * const blue: Color4.Mutable = Color4.Blue()\n * blue.a = 0.1 // this WORKS\n * ```\n */\nexport var Color4;\n(function (Color4) {\n /**\n * Creates create mutable Color4 from red, green, blue values, all between 0 and 1\n * @param r - defines the red component (between 0 and 1, default is 0)\n * @param g - defines the green component (between 0 and 1, default is 0)\n * @param b - defines the blue component (between 0 and 1, default is 0)\n * @param a - defines the alpha component (between 0 and 1, default is 1)\n */\n function create(\n /**\n * Defines the red component (between 0 and 1, default is 0)\n */\n r = 0, \n /**\n * Defines the green component (between 0 and 1, default is 0)\n */\n g = 0, \n /**\n * Defines the blue component (between 0 and 1, default is 0)\n */\n b = 0, \n /**\n * Defines the alpha component (between 0 and 1, default is 1)\n */\n a = 1) {\n return { r, g, b, a };\n }\n Color4.create = create;\n // Statics\n /**\n * Creates a Color4 from the string containing valid hexadecimal values\n * @param hex - defines a string containing valid hexadecimal values\n * @returns create mutable Color4\n */\n function fromHexString(hex) {\n if (hex.substring(0, 1) !== '#' || (hex.length !== 7 && hex.length !== 9)) {\n return create(0.0, 0.0, 0.0, 1.0);\n }\n const r = parseInt(hex.substring(1, 3), 16);\n const g = parseInt(hex.substring(3, 5), 16);\n const b = parseInt(hex.substring(5, 7), 16);\n const aStr = hex.substring(7, 9);\n const a = aStr ? parseInt(aStr, 16) : 255;\n return Color4.fromInts(r, g, b, a);\n }\n Color4.fromHexString = fromHexString;\n /**\n * Creates create mutable Color4 set with the linearly interpolated values of \"amount\" between the left Color4 object and the right Color4 object\n * @param left - defines the start value\n * @param right - defines the end value\n * @param amount - defines the gradient factor\n * @returns create mutable Color4\n */\n function lerp(left, right, amount) {\n const result = create(0.0, 0.0, 0.0, 0.0);\n Color4.lerpToRef(left, right, amount, result);\n return result;\n }\n Color4.lerp = lerp;\n /**\n * Set the given \"result\" with the linearly interpolated values of \"amount\" between the left Color4 object and the right Color4 object\n * @param left - defines the start value\n * @param right - defines the end value\n * @param amount - defines the gradient factor\n * @param result - defines the Color4 object where to store data\n */\n function lerpToRef(left, right, amount, result) {\n result.r = left.r + (right.r - left.r) * amount;\n result.g = left.g + (right.g - left.g) * amount;\n result.b = left.b + (right.b - left.b) * amount;\n result.a = left.a + (right.a - left.a) * amount;\n }\n Color4.lerpToRef = lerpToRef;\n /**\n * Returns a Color4 value containing a red color\n * @returns a new Color4\n */\n function Red() {\n return create(1.0, 0, 0, 1.0);\n }\n Color4.Red = Red;\n /**\n * Returns a Color4 value containing a green color\n * @returns create mutable Color4\n */\n function Green() {\n return create(0, 1.0, 0, 1.0);\n }\n Color4.Green = Green;\n /**\n * Returns a Color4 value containing a blue color\n * @returns create mutable Color4\n */\n function Blue() {\n return create(0, 0, 1.0, 1.0);\n }\n Color4.Blue = Blue;\n /**\n * Returns a Color4 value containing a black color\n * @returns create mutable Color4\n */\n function Black() {\n return create(0, 0, 0, 1);\n }\n Color4.Black = Black;\n /**\n * Returns a Color4 value containing a white color\n * @returns create mutable Color4\n */\n function White() {\n return create(1, 1, 1, 1);\n }\n Color4.White = White;\n /**\n * Returns a Color4 value containing a purple color\n * @returns create mutable Color4\n */\n function Purple() {\n return create(0.5, 0, 0.5, 1);\n }\n Color4.Purple = Purple;\n /**\n * Returns a Color4 value containing a magenta color\n * @returns create mutable Color4\n */\n function Magenta() {\n return create(1, 0, 1, 1);\n }\n Color4.Magenta = Magenta;\n /**\n * Returns a Color4 value containing a yellow color\n * @returns create mutable Color4\n */\n function Yellow() {\n return create(1, 1, 0, 1);\n }\n Color4.Yellow = Yellow;\n /**\n * Returns a Color4 value containing a gray color\n * @returns create mutable Color4\n */\n function Gray() {\n return create(0.5, 0.5, 0.5, 1.0);\n }\n Color4.Gray = Gray;\n /**\n * Returns a Color4 value containing a teal color\n * @returns create mutable Color4\n */\n function Teal() {\n return create(0, 1.0, 1.0, 1.0);\n }\n Color4.Teal = Teal;\n /**\n * Returns a Color4 value containing a transparent color\n * @returns create mutable Color4\n */\n function Clear() {\n return create(0, 0, 0, 0);\n }\n Color4.Clear = Clear;\n /**\n * Creates a Color4 from a Color3 and an alpha value\n * @param color3 - defines the source Color3 to read from\n * @param alpha - defines the alpha component (1.0 by default)\n * @returns create mutable Color4\n */\n function fromColor3(color3, alpha = 1.0) {\n return create(color3.r, color3.g, color3.b, alpha);\n }\n Color4.fromColor3 = fromColor3;\n /**\n * Creates a Color4 from the starting index element of the given array\n * @param array - defines the source array to read from\n * @param offset - defines the offset in the source array\n * @returns create mutable Color4\n */\n function fromArray(array, offset = 0) {\n return create(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);\n }\n Color4.fromArray = fromArray;\n /**\n * Creates a new Color3 from integer values (less than 256)\n * @param r - defines the red component to read from (value between 0 and 255)\n * @param g - defines the green component to read from (value between 0 and 255)\n * @param b - defines the blue component to read from (value between 0 and 255)\n * @param a - defines the alpha component to read from (value between 0 and 255)\n * @returns a new Color4\n */\n function fromInts(r, g, b, a) {\n return create(r / 255.0, g / 255.0, b / 255.0, a / 255.0);\n }\n Color4.fromInts = fromInts;\n /**\n * Check the content of a given array and convert it to an array containing RGBA data\n * If the original array was already containing count * 4 values then it is returned directly\n * @param colors - defines the array to check\n * @param count - defines the number of RGBA data to expect\n * @returns an array containing count * 4 values (RGBA)\n */\n function checkColors4(colors, count) {\n // Check if color3 was used\n if (colors.length === count * 3) {\n const colors4 = [];\n for (let index = 0; index < colors.length; index += 3) {\n const newIndex = (index / 3) * 4;\n colors4[newIndex] = colors[index];\n colors4[newIndex + 1] = colors[index + 1];\n colors4[newIndex + 2] = colors[index + 2];\n colors4[newIndex + 3] = 1.0;\n }\n return colors4;\n }\n return colors;\n }\n Color4.checkColors4 = checkColors4;\n // Operators\n /**\n * Adds the given Color4 values to the ref Color4 object\n * @param a - defines the first operand\n * @param b - defines the second operand\n * @param ref - defines the result rference\n * @returns\n */\n function addToRef(a, b, ref) {\n ref.r = a.r + b.r;\n ref.g = a.g + b.g;\n ref.b = a.b + b.b;\n ref.a = a.a + b.a;\n }\n Color4.addToRef = addToRef;\n /**\n * Stores from the starting index in the given array the Color4 successive values\n * @param array - defines the array where to store the r,g,b components\n * @param index - defines an optional index in the target array to define where to start storing values\n * @returns the current Color4 object\n */\n function toArray(value, array, index = 0) {\n array[index] = value.r;\n array[index + 1] = value.g;\n array[index + 2] = value.b;\n array[index + 3] = value.a;\n }\n Color4.toArray = toArray;\n /**\n * Creates a Color4 set with the added values of the current Color4 and of the given one\n * @param right - defines the second operand\n * @returns create mutable Color4\n */\n function add(value, right) {\n const ret = Clear();\n addToRef(value, right, ret);\n return ret;\n }\n Color4.add = add;\n /**\n * Creates a Color4 set with the subtracted values of the given one from the current Color4\n * @param right - defines the second operand\n * @returns create mutable Color4\n */\n function subtract(value, right) {\n const ret = Clear();\n subtractToRef(value, right, ret);\n return ret;\n }\n Color4.subtract = subtract;\n /**\n * Subtracts the given ones from the current Color4 values and stores the results in \"result\"\n * @param right - defines the second operand\n * @param result - defines the Color4 object where to store the result\n * @returns the current Color4 object\n */\n function subtractToRef(a, b, result) {\n result.r = a.r - b.r;\n result.g = a.g - b.g;\n result.b = a.b - b.b;\n result.a = a.a - b.a;\n }\n Color4.subtractToRef = subtractToRef;\n /**\n * Creates a Color4 with the current Color4 values multiplied by scale\n * @param scale - defines the scaling factor to apply\n * @returns create mutable Color4\n */\n function scale(value, scale) {\n return create(value.r * scale, value.g * scale, value.b * scale, value.a * scale);\n }\n Color4.scale = scale;\n /**\n * Multiplies the current Color4 values by scale and stores the result in \"result\"\n * @param scale - defines the scaling factor to apply\n * @param result - defines the Color4 object where to store the result\n */\n function scaleToRef(value, scale, result) {\n result.r = value.r * scale;\n result.g = value.g * scale;\n result.b = value.b * scale;\n result.a = value.a * scale;\n }\n Color4.scaleToRef = scaleToRef;\n /**\n * Scale the current Color4 values by a factor and add the result to a given Color4\n * @param scale - defines the scale factor\n * @param result - defines the Color4 object where to store the result\n */\n function scaleAndAddToRef(value, scale, result) {\n result.r += value.r * scale;\n result.g += value.g * scale;\n result.b += value.b * scale;\n result.a += value.a * scale;\n }\n Color4.scaleAndAddToRef = scaleAndAddToRef;\n /**\n * Clamps the rgb values by the min and max values and stores the result into \"result\"\n * @param min - defines minimum clamping value (default is 0)\n * @param max - defines maximum clamping value (default is 1)\n * @param result - defines color to store the result into.\n */\n function clampToRef(value, min = 0, max = 1, result) {\n result.r = Scalar.clamp(value.r, min, max);\n result.g = Scalar.clamp(value.g, min, max);\n result.b = Scalar.clamp(value.b, min, max);\n result.a = Scalar.clamp(value.a, min, max);\n }\n Color4.clampToRef = clampToRef;\n /**\n * Multipy an Color4 value by another and return create mutable Color4\n * @param color - defines the Color4 value to multiply by\n * @returns create mutable Color4\n */\n function multiply(value, color) {\n return create(value.r * color.r, value.g * color.g, value.b * color.b, value.a * color.a);\n }\n Color4.multiply = multiply;\n /**\n * Multipy a Color4 value by another and push the result in a reference value\n * @param color - defines the Color4 value to multiply by\n * @param result - defines the Color4 to fill the result in\n * @returns the result Color4\n */\n function multiplyToRef(value, color, result) {\n result.r = value.r * color.r;\n result.g = value.g * color.g;\n result.b = value.b * color.b;\n result.a = value.a * color.a;\n }\n Color4.multiplyToRef = multiplyToRef;\n /**\n * Creates a string with the Color4 current values\n * @returns the string representation of the Color4 object\n */\n function toString(value) {\n return ('{R: ' +\n value.r +\n ' G:' +\n value.g +\n ' B:' +\n value.b +\n ' A:' +\n value.a +\n '}');\n }\n Color4.toString = toString;\n /**\n * Compute the Color4 hash code\n * @returns an unique number that can be used to hash Color4 objects\n */\n function getHashCode(value) {\n let hash = value.r || 0;\n hash = (hash * 397) ^ (value.g || 0);\n hash = (hash * 397) ^ (value.b || 0);\n hash = (hash * 397) ^ (value.a || 0);\n return hash;\n }\n Color4.getHashCode = getHashCode;\n /**\n * Creates a Color4 copied from the current one\n * @returns create mutable Color4\n */\n function clone(value) {\n return create(value.r, value.g, value.b, value.a);\n }\n Color4.clone = clone;\n /**\n * Copies the given Color4 values into the destination\n * @param source - defines the source Color4 object\n * @param dest - defines the destination Color4 object\n * @returns\n */\n function copyFrom(source, dest) {\n dest.r = source.r;\n dest.g = source.g;\n dest.b = source.b;\n dest.a = source.a;\n }\n Color4.copyFrom = copyFrom;\n /**\n * Copies the given float values into the current one\n * @param r - defines the red component to read from\n * @param g - defines the green component to read from\n * @param b - defines the blue component to read from\n * @param a - defines the alpha component to read from\n * @returns the current updated Color4 object\n */\n function copyFromFloats(r, g, b, a, dest) {\n dest.r = r;\n dest.g = g;\n dest.b = b;\n dest.a = a;\n }\n Color4.copyFromFloats = copyFromFloats;\n /**\n * Copies the given float values into the current one\n * @param r - defines the red component to read from\n * @param g - defines the green component to read from\n * @param b - defines the blue component to read from\n * @param a - defines the alpha component to read from\n * @returns the current updated Color4 object\n */\n function set(r, g, b, a, dest) {\n dest.r = r;\n dest.g = g;\n dest.b = b;\n dest.a = a;\n }\n Color4.set = set;\n /**\n * Compute the Color4 hexadecimal code as a string\n * @returns a string containing the hexadecimal representation of the Color4 object\n */\n function toHexString(value) {\n const intR = (value.r * 255) | 0;\n const intG = (value.g * 255) | 0;\n const intB = (value.b * 255) | 0;\n const intA = (value.a * 255) | 0;\n return ('#' +\n Scalar.toHex(intR) +\n Scalar.toHex(intG) +\n Scalar.toHex(intB) +\n Scalar.toHex(intA));\n }\n Color4.toHexString = toHexString;\n /**\n * Computes a Color4 converted from the current one to linear space\n * @returns create mutable Color4\n */\n function toLinearSpace(value) {\n const convertedColor = create();\n toLinearSpaceToRef(value, convertedColor);\n return convertedColor;\n }\n Color4.toLinearSpace = toLinearSpace;\n /**\n * Converts the Color4 values to linear space and stores the result in \"convertedColor\"\n * @param convertedColor - defines the Color4 object where to store the linear space version\n * @returns the unmodified Color4\n */\n function toLinearSpaceToRef(value, ref) {\n ref.r = Math.pow(value.r, ToLinearSpace);\n ref.g = Math.pow(value.g, ToLinearSpace);\n ref.b = Math.pow(value.b, ToLinearSpace);\n ref.a = value.a;\n }\n Color4.toLinearSpaceToRef = toLinearSpaceToRef;\n /**\n * Computes a Color4 converted from the current one to gamma space\n * @returns create mutable Color4\n */\n function toGammaSpace(value) {\n const convertedColor = create();\n toGammaSpaceToRef(value, convertedColor);\n return convertedColor;\n }\n Color4.toGammaSpace = toGammaSpace;\n /**\n * Converts the Color4 values to gamma space and stores the result in \"convertedColor\"\n * @param convertedColor - defines the Color4 object where to store the gamma space version\n * @returns the unmodified Color4\n */\n function toGammaSpaceToRef(value, convertedColor) {\n convertedColor.r = Math.pow(value.r, ToGammaSpace);\n convertedColor.g = Math.pow(value.g, ToGammaSpace);\n convertedColor.b = Math.pow(value.b, ToGammaSpace);\n convertedColor.a = value.a;\n }\n Color4.toGammaSpaceToRef = toGammaSpaceToRef;\n})(Color4 || (Color4 = {}));\n", "import { ToLinearSpace, ToGammaSpace } from './types';\nimport { Color4 } from './Color4';\nimport { Scalar } from './Scalar';\n/**\n * @public\n * Color3 is a type and a namespace.\n * ```\n * // The namespace contains all types and functions to operates with Color3\n * Color3.add(blue, red) // sum component by component resulting pink\n * // The type Color3 is an alias to Color3.ReadonlyColor3\n * const readonlyBlue: Color3 = Color3.Blue()\n * readonlyBlue.r = 0.1 // this FAILS\n *\n * // For mutable usage, use `Color3.Mutable`\n * const blue: Color3.Mutable = Color3.Blue()\n * blue.r = 0.1 // this WORKS\n * ```\n */\nexport var Color3;\n(function (Color3) {\n /**\n * Creates Color3 object from red, green, blue values, all between 0 and 1\n * @param r - defines the red component (between 0 and 1, default is 0)\n * @param g - defines the green component (between 0 and 1, default is 0)\n * @param b - defines the blue component (between 0 and 1, default is 0)\n */\n function create(\n /**\n * Defines the red component (between 0 and 1, default is 0)\n */\n r = 0, \n /**\n * Defines the green component (between 0 and 1, default is 0)\n */\n g = 0, \n /**\n * Defines the blue component (between 0 and 1, default is 0)\n */\n b = 0) {\n return { r, g, b };\n }\n Color3.create = create;\n /**\n * Creates a Vector3 from the string containing valid hexadecimal values\n * @param hex - defines a string containing valid hexadecimal values\n * @returns a new Vector3\n */\n function fromHexString(hex) {\n if (hex.substring(0, 1) !== '#' || hex.length !== 7) {\n return create(0, 0, 0);\n }\n const r = parseInt(hex.substring(1, 3), 16);\n const g = parseInt(hex.substring(3, 5), 16);\n const b = parseInt(hex.substring(5, 7), 16);\n return fromInts(r, g, b);\n }\n Color3.fromHexString = fromHexString;\n /**\n * Creates a new Vector3 from the starting index of the given array\n * @param array - defines the source array\n * @param offset - defines an offset in the source array\n * @returns a new Vector3\n */\n function fromArray(array, offset = 0) {\n return create(array[offset], array[offset + 1], array[offset + 2]);\n }\n Color3.fromArray = fromArray;\n /**\n * Creates a Vector3 from integer values (less than 256)\n * @param r - defines the red component to read from (value between 0 and 255)\n * @param g - defines the green component to read from (value between 0 and 255)\n * @param b - defines the blue component to read from (value between 0 and 255)\n * @returns a new Vector3\n */\n function fromInts(r, g, b) {\n return create(r / 255.0, g / 255.0, b / 255.0);\n }\n Color3.fromInts = fromInts;\n /**\n * Creates a Vector3 with values linearly interpolated of \"amount\" between the start Color3 and the end Color3\n * @param start - defines the start Color3 value\n * @param end - defines the end Color3 value\n * @param amount - defines the gradient value between start and end\n * @returns a new Vector3\n */\n function lerp(start, end, amount) {\n const result = create(0.0, 0.0, 0.0);\n Color3.lerpToRef(start, end, amount, result);\n return result;\n }\n Color3.lerp = lerp;\n /**\n * Creates a Vector3 with values linearly interpolated of \"amount\" between the start Color3 and the end Color3\n * @param left - defines the start value\n * @param right - defines the end value\n * @param amount - defines the gradient factor\n * @param result - defines the Color3 object where to store the result\n */\n function lerpToRef(left, right, amount, result) {\n result.r = left.r + (right.r - left.r) * amount;\n result.g = left.g + (right.g - left.g) * amount;\n result.b = left.b + (right.b - left.b) * amount;\n }\n Color3.lerpToRef = lerpToRef;\n /**\n * Returns a Color3 value containing a red color\n * @returns a new Vector3\n */\n function Red() {\n return create(1, 0, 0);\n }\n Color3.Red = Red;\n /**\n * Returns a Color3 value containing a green color\n * @returns a new Vector3\n */\n function Green() {\n return create(0, 1, 0);\n }\n Color3.Green = Green;\n /**\n * Returns a Color3 value containing a blue color\n * @returns a new Vector3\n */\n function Blue() {\n return create(0, 0, 1);\n }\n Color3.Blue = Blue;\n /**\n * Returns a Color3 value containing a black color\n * @returns a new Vector3\n */\n function Black() {\n return create(0, 0, 0);\n }\n Color3.Black = Black;\n /**\n * Returns a Color3 value containing a white color\n * @returns a new Vector3\n */\n function White() {\n return create(1, 1, 1);\n }\n Color3.White = White;\n /**\n * Returns a Color3 value containing a purple color\n * @returns a new Vector3\n */\n function Purple() {\n return create(0.5, 0, 0.5);\n }\n Color3.Purple = Purple;\n /**\n * Returns a Color3 value containing a magenta color\n * @returns a new Vector3\n */\n function Magenta() {\n return create(1, 0, 1);\n }\n Color3.Magenta = Magenta;\n /**\n * Returns a Color3 value containing a yellow color\n * @returns a new Vector3\n */\n function Yellow() {\n return create(1, 1, 0);\n }\n Color3.Yellow = Yellow;\n /**\n * Returns a Color3 value containing a gray color\n * @returns a new Vector3\n */\n function Gray() {\n return create(0.5, 0.5, 0.5);\n }\n Color3.Gray = Gray;\n /**\n * Returns a Color3 value containing a teal color\n * @returns a new Vector3\n */\n function Teal() {\n return create(0, 1.0, 1.0);\n }\n Color3.Teal = Teal;\n /**\n * Returns a Color3 value containing a random color\n * @returns a new Vector3\n */\n function Random() {\n return create(Math.random(), Math.random(), Math.random());\n }\n Color3.Random = Random;\n /**\n * Creates a string with the Color3 current values\n * @returns the string representation of the Color3 object\n */\n function toString(value) {\n return '{R: ' + value.r + ' G:' + value.g + ' B:' + value.b + '}';\n }\n Color3.toString = toString;\n /**\n * Compute the Color3 hash code\n * @returns an unique number that can be used to hash Color3 objects\n */\n function getHashCode(value) {\n let hash = value.r || 0;\n hash = (hash * 397) ^ (value.g || 0);\n hash = (hash * 397) ^ (value.b || 0);\n return hash;\n }\n Color3.getHashCode = getHashCode;\n // Operators\n /**\n * Stores in the given array from the given starting index the red, green, blue values as successive elements\n * @param array - defines the array where to store the r,g,b components\n * @param index - defines an optional index in the target array to define where to start storing values\n *\n */\n function toArray(value, array, index = 0) {\n array[index] = value.r;\n array[index + 1] = value.g;\n array[index + 2] = value.b;\n }\n Color3.toArray = toArray;\n /**\n * Returns a new Color4 object from the current Color3 and the given alpha\n * @param alpha - defines the alpha component on the new Color4 object (default is 1)\n * @returns a new Color4 object\n */\n function toColor4(value, alpha = 1) {\n return Color4.create(value.r, value.g, value.b, alpha);\n }\n Color3.toColor4 = toColor4;\n /**\n * Returns a new array populated with 3 numeric elements : red, green and blue values\n * @returns the new array\n */\n function asArray(value) {\n const result = new Array();\n toArray(value, result, 0);\n return result;\n }\n Color3.asArray = asArray;\n /**\n * Returns the luminance value\n * @returns a float value\n */\n function toLuminance(value) {\n return value.r * 0.3 + value.g * 0.59 + value.b * 0.11;\n }\n Color3.toLuminance = toLuminance;\n /**\n * Multiply each Color3 rgb values by the given Color3 rgb values in Color3 object\n * @param otherColor - defines the second operand\n * @returns the create object\n */\n function multiply(value, otherColor) {\n return create(value.r * otherColor.r, value.g * otherColor.g, value.b * otherColor.b);\n }\n Color3.multiply = multiply;\n /**\n * Multiply the rgb values of the Color3 and the given Color3 and stores the result in the object \"result\"\n * @param otherColor - defines the second operand\n * @param result - defines the Color3 object where to store the result\n * @returns the current Color3\n */\n function multiplyToRef(value, otherColor, result) {\n result.r = value.r * otherColor.r;\n result.g = value.g * otherColor.g;\n result.b = value.b * otherColor.b;\n }\n Color3.multiplyToRef = multiplyToRef;\n /**\n * Determines equality between Color3 objects\n * @param otherColor - defines the second operand\n * @returns true if the rgb values are equal to the given ones\n */\n function equals(value, otherColor) {\n return (otherColor &&\n value.r === otherColor.r &&\n value.g === otherColor.g &&\n value.b === otherColor.b);\n }\n Color3.equals = equals;\n /**\n * Determines equality between the current Color3 object and a set of r,b,g values\n * @param r - defines the red component to check\n * @param g - defines the green component to check\n * @param b - defines the blue component to check\n * @returns true if the rgb values are equal to the given ones\n */\n function equalsFloats(value, r, g, b) {\n return value.r === r && value.g === g && value.b === b;\n }\n Color3.equalsFloats = equalsFloats;\n /**\n * Multiplies in place each rgb value by scale\n * @param scale - defines the scaling factor\n * @returns the updated Color3\n */\n function scale(value, scale) {\n return create(value.r * scale, value.g * scale, value.b * scale);\n }\n Color3.scale = scale;\n /**\n * Multiplies the rgb values by scale and stores the result into \"result\"\n * @param scale - defines the scaling factor\n * @param result - defines the Color3 object where to store the result\n * @returns the unmodified current Color3\n */\n function scaleToRef(value, scale, result) {\n result.r = value.r * scale;\n result.g = value.g * scale;\n result.b = value.b * scale;\n }\n Color3.scaleToRef = scaleToRef;\n /**\n * Scale the current Color3 values by a factor and add the result to a given Color3\n * @param scale - defines the scale factor\n * @param result - defines color to store the result into\n * @returns the unmodified current Color3\n */\n function scaleAndAddToRef(value, scale, result) {\n result.r += value.r * scale;\n result.g += value.g * scale;\n result.b += value.b * scale;\n }\n Color3.scaleAndAddToRef = scaleAndAddToRef;\n /**\n * Clamps the rgb values by the min and max values and stores the result into \"result\"\n * @param min - defines minimum clamping value (default is 0)\n * @param max - defines maximum clamping value (default is 1)\n * @param result - defines color to store the result into\n * @returns the original Color3\n */\n function clampToRef(value, min = 0, max = 1, result) {\n result.r = Scalar.clamp(value.r, min, max);\n result.g = Scalar.clamp(value.g, min, max);\n result.b = Scalar.clamp(value.b, min, max);\n }\n Color3.clampToRef = clampToRef;\n /**\n * Clamps the rgb values by the min and max values and returns the result\n * @param min - defines minimum clamping value (default is 0)\n * @param max - defines maximum clamping value (default is 1)\n * @returns result\n */\n function clamp(value, min = 0, max = 1) {\n const result = Color3.Black();\n clampToRef(value, min, max, result);\n return result;\n }\n Color3.clamp = clamp;\n /**\n * Creates Color3 set with the added values of the current Color3 and of the given one\n * @param otherColor - defines the second operand\n * @returns the create\n */\n function add(value, otherColor) {\n return create(value.r + otherColor.r, value.g + otherColor.g, value.b + otherColor.b);\n }\n Color3.add = add;\n /**\n * Stores the result of the addition of the current Color3 and given one rgb values into \"result\"\n * @param otherColor - defines the second operand\n * @param result - defines Color3 object to store the result into\n * @returns the unmodified current Color3\n */\n function addToRef(value, otherColor, result) {\n result.r = value.r + otherColor.r;\n result.g = value.g + otherColor.g;\n result.b = value.b + otherColor.b;\n }\n Color3.addToRef = addToRef;\n /**\n * Returns Color3 set with the subtracted values of the given one from the current Color3\n * @param otherColor - defines the second operand\n * @returns the create\n */\n function subtract(value, otherColor) {\n return create(value.r - otherColor.r, value.g - otherColor.g, value.b - otherColor.b);\n }\n Color3.subtract = subtract;\n /**\n * Stores the result of the subtraction of given one from the current Color3 rgb values into \"result\"\n * @param otherColor - defines the second operand\n * @param result - defines Color3 object to store the result into\n * @returns the unmodified current Color3\n */\n function subtractToRef(value, otherColor, result) {\n result.r = value.r - otherColor.r;\n result.g = value.g - otherColor.g;\n result.b = value.b - otherColor.b;\n }\n Color3.subtractToRef = subtractToRef;\n /**\n * Copy the current object\n * @returns Color3 copied the current one\n */\n function clone(value) {\n return create(value.r, value.g, value.b);\n }\n Color3.clone = clone;\n /**\n * Copies the rgb values from the source in the current Color3\n * @param source - defines the source Color3 object\n * @returns the updated Color3 object\n */\n function copyFrom(source, dest) {\n dest.r = source.r;\n dest.g = source.g;\n dest.b = source.b;\n }\n Color3.copyFrom = copyFrom;\n /**\n * Updates the Color3 rgb values from the given floats\n * @param dest -\n * @param r - defines the red component to read from\n * @param g - defines the green component to read from\n * @param b - defines the blue component to read from\n * @returns\n */\n function set(dest, r, g, b) {\n dest.r = r;\n dest.g = g;\n dest.b = b;\n }\n Color3.set = set;\n /**\n * Compute the Color3 hexadecimal code as a string\n * @returns a string containing the hexadecimal representation of the Color3 object\n */\n function toHexString(value) {\n const intR = (value.r * 255) | 0;\n const intG = (value.g * 255) | 0;\n const intB = (value.b * 255) | 0;\n return '#' + Scalar.toHex(intR) + Scalar.toHex(intG) + Scalar.toHex(intB);\n }\n Color3.toHexString = toHexString;\n /**\n * Computes Color3 converted from the current one to linear space\n * @returns a new Vector3\n */\n function toLinearSpace(value) {\n const convertedColor = create();\n toLinearSpaceToRef(value, convertedColor);\n return convertedColor;\n }\n Color3.toLinearSpace = toLinearSpace;\n /**\n * Converts the Color3 values to linear space and stores the result in \"convertedColor\"\n * @param convertedColor - defines the Color3 object where to store the linear space version\n * @returns the unmodified Color3\n */\n function toLinearSpaceToRef(value, convertedColor) {\n convertedColor.r = Math.pow(value.r, ToLinearSpace);\n convertedColor.g = Math.pow(value.g, ToLinearSpace);\n convertedColor.b = Math.pow(value.b, ToLinearSpace);\n }\n Color3.toLinearSpaceToRef = toLinearSpaceToRef;\n /**\n * Computes Color3 converted from the current one to gamma space\n * @returns a new Vector3\n */\n function toGammaSpace(value) {\n const convertedColor = create();\n toGammaSpaceToRef(value, convertedColor);\n return convertedColor;\n }\n Color3.toGammaSpace = toGammaSpace;\n /**\n * Converts the Color3 values to gamma space and stores the result in \"convertedColor\"\n * @param convertedColor - defines the Color3 object where to store the gamma space version\n * @returns the unmodified Color3\n */\n function toGammaSpaceToRef(value, convertedColor) {\n convertedColor.r = Math.pow(value.r, ToGammaSpace);\n convertedColor.g = Math.pow(value.g, ToGammaSpace);\n convertedColor.b = Math.pow(value.b, ToGammaSpace);\n }\n Color3.toGammaSpaceToRef = toGammaSpaceToRef;\n})(Color3 || (Color3 = {}));\n", "import { Vector3, Color4 } from '@dcl/sdk/math'\nimport { engine, Schemas, } from '@dcl/sdk/ecs'\n/**\n * Types\n */\n\nexport enum SyncEntityIDs {\n TAP_RED = 1,\n TAP_GREEN = 2,\n TAP_YELLOW = 3,\n CUTTER1 = 4,\n CUTTER2 = 5,\n POT1 = 6,\n POT2 = 7,\n DISPENSER_ROLLS = 8,\n DISPENSER_NOODLES = 9,\n GLASS1 = 10,\n GLASS2 = 11,\n GLASS3 = 12,\n GLASS4 = 13,\n GLASS5 = 14,\n GLASS6 = 15,\n GLASS7 = 16,\n GLASS8 = 17,\n GLASS9 = 18,\n BEER_DISPENSER = 19,\n GAME_SESSION = 20,\n SCORE_TEXT = 21,\n MISSES_TEXT = 22,\n POT_BUTTON1 = 23,\n POT_BUTTON2 = 24,\n DISPENSER_BUTTON1 = 25,\n DISPENSER_BUTTON2 = 26,\n RESET_BUTTON = 27,\n BUBBLE1_A = 28,\n BUBBLE1_B = 29,\n BUBBLE1_C = 30,\n BUBBLE2_A = 31,\n BUBBLE2_B = 32,\n BUBBLE2_C = 33,\n BUBBLE3_A = 34,\n BUBBLE3_B = 35,\n BUBBLE3_C = 36,\n BUBBLE4_A = 37,\n BUBBLE4_B = 38,\n BUBBLE4_C = 39,\n PBAR1_A = 40,\n PBAR1_B = 41,\n PBAR2_A = 42,\n PBAR2_B = 43,\n PBAR3_A = 44,\n PBAR3_B = 45,\n PBAR4_A = 46,\n PBAR4_B = 47,\n PBAR5_A = 48,\n PBAR5_B = 49,\n PBAR6_A = 50,\n PBAR6_B = 51,\n CUSTOMER1 = 52,\n CUSTOMER2 = 53,\n CUSTOMER3 = 54,\n CUSTOMER4 = 55,\n // TABLES = 19\n}\n\n\nexport enum BeerType {\n NONE,\n RED,\n YELLOW,\n GREEN\n}\n\nexport type TapDataType = {\n model: string\n position: Vector3\n name: string\n}\n\n\nexport enum SoupState {\n Empty,\n Raw,\n Cooked,\n Burned,\n}\n\nexport enum IngredientType {\n Noodles,\n SushiRoll,\n CookedNoodles,\n SlicedSushi,\n Trash,\n BeerGlass,\n YellowBeer,\n RedBeer,\n GreenBeer,\n}\n\nexport enum SpeechBubbleType {\n Neutral,\n Good,\n Bad\n}\n\n\n\n\nexport const TAP_DATA: Record = {\n [BeerType.RED]: {\n name: 'Red',\n model: 'assets/models/redTap.glb',\n position: Vector3.create(0.368, 0, 0.31)\n },\n [BeerType.YELLOW]: {\n name: 'Yellow',\n model: 'assets/models/yellowTap.glb',\n position: Vector3.create(0, 0, 0.31)\n },\n [BeerType.GREEN]: {\n name: 'Green',\n model: 'assets/models/greenTap.glb',\n position: Vector3.create(-0.368, 0, 0.31)\n }\n}\n\nexport function getTapData(tapBeerType: BeerType) {\n return (TAP_DATA as any)[tapBeerType] as TapDataType\n}\n\n/**\n * Component Definitions\n */\n\nexport const DynamicSyncId = engine.defineComponent('DynamicSyncId', {\n id: Schemas.Number\n})\n\n\n\nexport const BeerGlass = engine.defineComponent('BeerGlass', {\n //beingFilled: Schemas.Boolean,\n filled: Schemas.Boolean,\n beerType: Schemas.EnumNumber(BeerType, BeerType.NONE),\n drinking: Schemas.Boolean\n})\nexport const PickedUp = engine.defineComponent('PickedUp', {\n //child: Schemas.Entity,\n avatarId: Schemas.String\n})\n\nexport const TapComponent = engine.defineComponent('TapComponent', {\n pouringTime: Schemas.Number,\n pouring: Schemas.Boolean,\n beerType: Schemas.EnumNumber(BeerType, BeerType.NONE)\n})\n\nexport const TapBase = engine.defineComponent('TapBase', {\n beerType: Schemas.EnumNumber(BeerType, BeerType.NONE)\n})\n\n\n// export const GridPosition = engine.defineComponent('GridPosition', {\n// object: Schemas.Entity,\n// type: Schemas.EnumNumber(TileType, TileType.Floor)\n\n// })\n\nexport const PotData = engine.defineComponent('Pot', {\n state: Schemas.EnumNumber(SoupState, SoupState.Raw),\n hasIngredient: Schemas.Boolean,\n progressBar: Schemas.Entity,\n attachedEntity: Schemas.Entity || undefined\n}, {\n state: SoupState.Empty,\n hasIngredient: false,\n attachedEntity: undefined,\n})\n\n\nexport const GrabableObjectComponent = engine.defineComponent('GrabableObjectComponent', {\n type: Schemas.EnumNumber(IngredientType, IngredientType.Noodles),\n beingProcessed: Schemas.Boolean,\n processed: Schemas.Boolean,\n}, {\n type: IngredientType.Noodles,\n})\n\nexport const Cooking = engine.defineComponent('Cooking', {\n active: Schemas.Boolean,\n time: Schemas.Number,\n progressBar: Schemas.Entity,\n}, {\n active: true,\n time: 0,\n})\n\n\nexport const CuttingBoard = engine.defineComponent('CuttingBoard', {\n hasRoll: Schemas.Boolean,\n cutting: Schemas.Boolean,\n rollChild: Schemas.Entity || undefined,\n cuts: Schemas.Number,\n cutTime: Schemas.Number,\n totalCutTime: Schemas.Number,\n modelEntity: Schemas.Entity\n}, {\n hasRoll: false,\n cuts: 0,\n rollChild: undefined,\n cutting: false,\n cutTime: 0.7,\n totalCutTime: 0.7\n})\n\n\n\nexport const ProgressBar = engine.defineComponent('ProgressBar', {\n visible: Schemas.Boolean,\n active: Schemas.Boolean,\n ratio: Schemas.Number,\n yellowWarning: Schemas.Number,\n redWarning: Schemas.Number,\n fullLength: Schemas.Number,\n movesUp: Schemas.Boolean,\n color: Schemas.Color4,\n speed: Schemas.Number,\n parent: Schemas.Entity\n}, {\n visible: true,\n active: true,\n ratio: 0,\n yellowWarning: 0.5,\n redWarning: 0.75,\n fullLength: 1,\n movesUp: true,\n color: Color4.Green(),\n speed: 1,\n //parent: Schemas.Entity\n})\n\n\n\nexport const CustomerData = engine.defineComponent('CustomerData', {\n active: Schemas.Boolean,\n dish: Schemas.EnumNumber(IngredientType, IngredientType.Noodles),\n message: Schemas.String,\n speechBubble: Schemas.Entity,\n receivedDish: Schemas.Boolean, // TODO: true to force the 1st initialization??\n //plate: CustomerPlate\n seatNumber: Schemas.Number,\n timeBeforeLeaving: Schemas.Number,\n timeBeforeEntering: Schemas.Number,\n waitingTimer: Schemas.Number,\n progressBar: Schemas.Entity\n}, {\n active: false,\n receivedDish: false,\n timeBeforeLeaving: 30,\n timeBeforeEntering: 10,\n waitingTimer: 30,\n})\n\nexport const GameData = engine.defineComponent('GameData', {\n active: Schemas.Boolean,\n playerScore: Schemas.Number,\n playerMisses: Schemas.Number,\n customerTimer: Schemas.Number,\n customerInterval: Schemas.Number,\n}, {\n active: true,\n playerScore: 0,\n playerMisses: 0,\n customerTimer: 2,\n customerInterval: 10,\n})\n", "import { Transform, engine, executeTask, Entity, Animator, AudioSource } from '@dcl/sdk/ecs'\nimport { Vector3 } from '@dcl/sdk/math'\nimport { getUserData } from '~system/UserIdentity'\nimport { DynamicSyncId } from '../definitions'\n\nexport function getPlayerPosition() {\n return Transform.getOrNull(engine.PlayerEntity)?.position || Vector3.create()\n}\n\nexport let currentPlayerId: string\n\nvoid executeTask(async () => {\n const user = await getUserData({})\n if (!user.data) return\n currentPlayerId = user.data?.userId\n})\n\nexport function* getEntitiesWithParent(parent: Entity) {\n for (const [entity, transform] of engine.getEntitiesWith(Transform)) {\n if (transform.parent === parent) {\n yield [entity, transform]\n }\n }\n}\n\nexport function getEntityParent(entity: Entity) {\n return Transform.getOrNull(entity)?.parent || engine.RootEntity\n}\n\n\n\n\nexport function playSound(audio: string, loop: boolean = false, position?: Vector3) {\n const entity = engine.addEntity()\n AudioSource.create(entity, {\n audioClipUrl: audio,\n loop,\n playing: true\n })\n\n Transform.create(entity, {\n position\n })\n\n return entity\n}\n\n\n\nexport function getSyncId(entity: Entity) {\n\n let takenIds: number[] = []\n\n for (const [ent] of engine.getEntitiesWith(DynamicSyncId)) {\n\n takenIds.push(DynamicSyncId.get(ent).id)\n }\n\n let id = 1000\n while (takenIds.includes(id)) {\n id++\n }\n\n console.log(\"CREATING SYNC ID\", id)\n\n DynamicSyncId.create(entity, { id: id })\n\n return id\n\n}", "import { sendBinary } from '~system/CommunicationsController'\nimport { engine } from '@dcl/ecs'\nimport { addSyncTransport } from './message-bus-sync'\nimport { getUserData } from '~system/UserIdentity'\n\n// initialize sync transport for sdk engine\nconst { getChildren, syncEntity, parentEntity, getParent, myProfile, removeParent, getFirstChild } = addSyncTransport(\n engine,\n sendBinary,\n getUserData\n)\n\nexport { getFirstChild, getChildren, syncEntity, parentEntity, getParent, myProfile, removeParent }\n", "import {\n TransportMessage,\n PointerEventsResult,\n GltfContainerLoadingState,\n EntityUtils,\n RESERVED_STATIC_ENTITIES,\n CrdtMessageType,\n SyncComponents as _SyncComponents,\n NetworkEntity as _NetworkEntity,\n NetworkParent as _NetworkParent,\n IEngine\n} from '@dcl/ecs'\n\nexport function syncFilter(engine: IEngine) {\n const NetworkEntity = engine.getComponent(_NetworkEntity.componentId) as typeof _NetworkEntity\n const SyncComponents = engine.getComponent(_SyncComponents.componentId) as typeof _SyncComponents\n\n return function (message: Omit) {\n const componentId = (message as any).componentId\n\n if ([PointerEventsResult.componentId, GltfContainerLoadingState.componentId].includes(componentId)) {\n return false\n }\n\n const [entityId] = EntityUtils.fromEntityId(message.entityId)\n\n // filter messages from reserved entities.\n if (entityId < RESERVED_STATIC_ENTITIES) {\n return false\n }\n\n const network = NetworkEntity.getOrNull(message.entityId)\n // Delete Network Entity Always\n if (\n message.type === CrdtMessageType.DELETE_ENTITY_NETWORK ||\n (network && message.type === CrdtMessageType.DELETE_ENTITY)\n ) {\n return true\n }\n\n const sync = SyncComponents.getOrNull(message.entityId)\n if (!sync) return false\n\n // First component\n if ((message as any).timestamp <= 1) {\n return true\n }\n\n if (componentId === NetworkEntity.componentId) {\n return false\n }\n\n // If there is a change in the network parent or syncComponents we should always sync\n if (componentId === _NetworkParent.componentId || componentId === SyncComponents.componentId) {\n return true\n }\n\n if (componentId && sync.componentIds.includes(componentId)) {\n return true\n }\n\n return false\n }\n}\n", "import { ReadWriteByteBuffer } from '@dcl/ecs/dist/serialization/ByteBuffer'\nimport {\n CrdtMessageHeader,\n CrdtMessageProtocol,\n CrdtMessageType,\n IEngine,\n PutComponentOperation,\n PutNetworkComponentOperation,\n SyncComponents as _SyncComponents,\n NetworkEntity as _NetworkEntity,\n ISyncComponents,\n INetowrkEntity\n} from '@dcl/ecs'\n\nexport function engineToCrdt(engine: IEngine): Uint8Array {\n const crdtBuffer = new ReadWriteByteBuffer()\n const networkBuffer = new ReadWriteByteBuffer()\n const SyncComponents = engine.getComponent(_SyncComponents.componentId) as ISyncComponents\n const NetworkEntity = engine.getComponent(_NetworkEntity.componentId) as INetowrkEntity\n\n for (const itComponentDefinition of engine.componentsIter()) {\n itComponentDefinition.dumpCrdtStateToBuffer(crdtBuffer, (entity) => {\n const isNetworkEntity = NetworkEntity.has(entity)\n if (!isNetworkEntity) {\n return false\n }\n const isDynamicEntity = NetworkEntity.get(entity).networkId\n if (isDynamicEntity) {\n return true\n }\n // For the static entities we only send the updates of the SyncComponents\n return SyncComponents.get(entity).componentIds.includes(itComponentDefinition.componentId)\n })\n }\n\n let header: CrdtMessageHeader | null\n while ((header = CrdtMessageProtocol.getHeader(crdtBuffer))) {\n if (header.type === CrdtMessageType.PUT_COMPONENT) {\n const message = PutComponentOperation.read(crdtBuffer)!\n const networkEntity = NetworkEntity.getOrNull(message.entityId)\n if (networkEntity) {\n PutNetworkComponentOperation.write(\n networkEntity.entityId,\n message.timestamp,\n message.componentId,\n networkEntity.networkId,\n message.data,\n networkBuffer\n )\n } else {\n PutComponentOperation.write(\n message.entityId,\n message.timestamp,\n message.componentId,\n message.data,\n networkBuffer\n )\n }\n } else {\n crdtBuffer.incrementReadOffset(header.length)\n }\n }\n\n return networkBuffer.toBinary()\n}\n", "import { ReadWriteByteBuffer } from '@dcl/ecs/dist/serialization/ByteBuffer'\n\nexport enum CommsMessage {\n CRDT = 1,\n REQ_CRDT_STATE = 2,\n RES_CRDT_STATE = 3\n}\n\nexport function BinaryMessageBus(send: (message: Uint8Array) => void) {\n const mapping: Map void> = new Map()\n return {\n on: (message: K, callback: (value: Uint8Array, sender: string) => void) => {\n mapping.set(message, callback)\n },\n emit: (message: K, value: Uint8Array) => {\n send(craftCommsMessage(message, value))\n },\n __processMessages: (messages: Uint8Array[]) => {\n for (const message of messages) {\n const commsMsg = decodeCommsMessage(message)\n if (!commsMsg) continue\n const { sender, messageType, data } = commsMsg\n const fn = mapping.get(messageType)\n if (fn) fn(data, sender)\n }\n }\n }\n}\n\nexport function craftCommsMessage(messageType: T, payload: Uint8Array): Uint8Array {\n const msg = new Uint8Array(payload.byteLength + 1)\n msg.set([messageType])\n msg.set(payload, 1)\n return msg\n}\n\nexport function decodeCommsMessage(\n data: Uint8Array\n): { sender: string; messageType: T; data: Uint8Array } | undefined {\n try {\n let offset = 0\n const r = new Uint8Array(data)\n const view = new DataView(r.buffer)\n const senderLength = view.getUint8(offset)\n offset += 1\n const sender = decodeString(data.subarray(1, senderLength + 1))\n offset += senderLength\n const messageType = view.getUint8(offset) as T\n offset += 1\n const message = r.subarray(offset)\n\n return {\n sender,\n messageType,\n data: message\n }\n } catch (e) {\n console.error('Invalid Comms message', e)\n }\n}\n\nexport function decodeString(data: Uint8Array): string {\n const buffer = new ReadWriteByteBuffer()\n buffer.writeBuffer(data, true)\n return buffer.readUtf8String()\n}\n\nexport function encodeString(s: string): Uint8Array {\n const buffer = new ReadWriteByteBuffer()\n buffer.writeUtf8String(s)\n return buffer.readBuffer()\n}\n", "import {\n EngineInfo as _EngineInfo,\n Entity,\n IEngine,\n NetworkEntity as _NetworkEntity,\n Schemas,\n LastWriteWinElementSetComponentDefinition,\n PBEngineInfo\n} from '@dcl/ecs'\nimport { componentNumberFromName } from '@dcl/ecs/dist/components/component-number'\n\nimport type { GetUserDataRequest, GetUserDataResponse } from '~system/UserIdentity'\nimport { SyncEntity } from './entities'\nimport { IProfile } from './message-bus-sync'\n\n// Component to track all the players and when they enter to the scene.\n// Know who is in charge of sending the initial state (oldest one)\nexport const definePlayersInScene = (engine: IEngine) =>\n engine.defineComponent('players-scene', {\n timestamp: Schemas.Number,\n userId: Schemas.String\n })\n\n// Already initialized my state. Ignore new states messages.\nexport let stateInitialized = false\n\n// My player entity to check if I'm the oldest player in the scend\nexport let playerSceneEntity: Entity\n\nexport function setInitialized() {\n stateInitialized = true\n}\n\n// Flag to avoid sending over the wire all the initial messages that the engine add's to the rendererTransport\n// INITIAL_CRDT_MESSAGES that are being processed on the onStart loop, before the onUpdate.\nexport let INITIAL_CRDT_RENDERER_MESSAGES_SENT = false\n\n// Retrieve userId to start sending this info as the networkId\nexport function fetchProfile(\n myProfile: IProfile,\n getUserData: (value: GetUserDataRequest) => Promise\n) {\n void getUserData({}).then(({ data }) => {\n if (data?.userId) {\n const userId = data.userId\n const networkId = componentNumberFromName(data.userId)\n myProfile.networkId = networkId\n myProfile.userId = userId\n } else {\n throw new Error(`Couldn't fetch profile data`)\n }\n })\n}\n\n/**\n * Add's the user information about when he joined the scene.\n * It's used to check who is the oldest one, to sync the state\n */\nexport function createPlayerTimestampData(engine: IEngine, profile: IProfile, syncEntity: SyncEntity) {\n if (!profile?.userId) return undefined\n const PlayersInScene = definePlayersInScene(engine)\n const entity = engine.addEntity()\n PlayersInScene.create(entity, { timestamp: Date.now(), userId: profile.userId })\n syncEntity(entity, [PlayersInScene.componentId])\n playerSceneEntity = entity\n return playerSceneEntity\n}\n\n/**\n * Check if I'm the older user to send the initial state\n */\nexport function oldestUser(engine: IEngine, profile: IProfile, syncEntity: SyncEntity): boolean {\n const PlayersInScene = definePlayersInScene(engine)\n // When the user leaves the scene but it's still connected.\n if (!PlayersInScene.has(playerSceneEntity)) {\n createPlayerTimestampData(engine, profile, syncEntity)\n return oldestUser(engine, profile, syncEntity)\n }\n const { timestamp } = PlayersInScene.get(playerSceneEntity)\n for (const [_, player] of engine.getEntitiesWith(PlayersInScene)) {\n if (player.timestamp < timestamp) return false\n }\n return true\n}\n\n/**\n * Ignore CRDT's initial messages from the renderer.\n */\nexport function syncTransportIsReady(engine: IEngine) {\n const EngineInfo = engine.getComponent(\n _EngineInfo.componentId\n ) as LastWriteWinElementSetComponentDefinition\n if (!INITIAL_CRDT_RENDERER_MESSAGES_SENT) {\n const engineInfo = EngineInfo.getOrNull(engine.RootEntity)\n if (engineInfo && engineInfo.tickNumber > 2) {\n INITIAL_CRDT_RENDERER_MESSAGES_SENT = true\n }\n }\n return INITIAL_CRDT_RENDERER_MESSAGES_SENT\n}\n\n/**\n * Check if we are already initialized\n * Add the playerSceneData component and syncronize it till we receive the state.\n * This fn should be added as a system so it runs on every tick\n */\n// TODO: Had to comment all the logic because getConnectedPlayers was not working as expected\n// A lot of raise conditions. For now we will go with the approach that every client that it's initialized will send his crdt state.\nexport function stateInitializedChecker(engine: IEngine, _profile: IProfile, _syncEntity: SyncEntity) {\n // const PlayersInScene = definePlayersInScene(engine)\n const EngineInfo = engine.getComponent(_EngineInfo.componentId) as typeof _EngineInfo\n // const NetworkEntity = engine.getComponent(_NetworkEntity.componentId) as INetowrkEntity\n async function enterScene() {\n // if (!playerSceneEntity) {\n // createPlayerTimestampData(engine, profile, syncEntity)\n // }\n\n /**\n * Keeps PlayersInScene up-to-date with the current players.\n */\n // const connectedPlayers = await getConnectedPlayers({})\n // for (const [entity, player] of engine.getEntitiesWith(PlayersInScene)) {\n // if (!connectedPlayers.players.find(($) => $.userId === player.userId)) {\n // PlayersInScene.deleteFrom(entity)\n // }\n // }\n\n // Wait for comms to be ready ?? ~3000ms\n if ((EngineInfo.getOrNull(engine.RootEntity)?.tickNumber ?? 0) > 100) {\n setInitialized()\n return\n }\n\n // If we already have data from players, dont send the heartbeat messages\n // if (connectedPlayers.players.length) return\n\n // if (!stateInitialized && playerSceneEntity) {\n // // Send this data to all the players connected (new and old)\n // // So everyone can decide if it's the oldest one or no.\n // // It's for the case that multiple users enters ~ at the same time.\n // PlayersInScene.getMutable(playerSceneEntity)\n // }\n }\n void enterScene()\n}\n", "import {\n Entity,\n IEngine,\n NetworkEntity as _NetworkEntity,\n INetowrkEntity,\n NetworkParent as _NetworkParent,\n Transform as _Transform,\n SyncComponents as _SyncComponents,\n INetowrkParent,\n TransformComponent,\n ISyncComponents\n} from '@dcl/ecs'\nimport { IProfile } from './message-bus-sync'\n\nexport type SyncEntity = (entityId: Entity, componentIds: number[], entityEnumId?: number) => void\n\nexport function entityUtils(engine: IEngine, profile: IProfile) {\n const NetworkEntity = engine.getComponent(_NetworkEntity.componentId) as INetowrkEntity\n const NetworkParent = engine.getComponent(_NetworkParent.componentId) as INetowrkParent\n const Transform = engine.getComponent(_Transform.componentId) as TransformComponent\n const SyncComponents = engine.getComponent(_SyncComponents.componentId) as ISyncComponents\n\n /**\n * Create a network entity (sync) through comms, and sync the received components\n */\n function syncEntity(entityId: Entity, componentIds: number[], entityEnumId?: number) {\n // Profile not initialized\n if (!profile?.networkId) {\n throw new Error('Profile not initialized. Called syncEntity inside the main() function.')\n }\n\n // We use the networkId generated by the user address to identify this entity through the network\n const networkValue = { entityId, networkId: profile.networkId }\n\n // If there is an entityEnumId, it means is the same entity for all the clients created on the main funciton.\n // So the networkId should be the same in all the clients to avoid re-creating this entity.\n // For this case we use networkId = 0.\n if (entityEnumId !== undefined) {\n networkValue.networkId = 0\n networkValue.entityId = entityEnumId as Entity\n\n // Check if this enum is already used\n for (const [_, network] of engine.getEntitiesWith(NetworkEntity)) {\n if (network.networkId === networkValue.networkId && network.entityId === networkValue.entityId) {\n throw new Error('syncEntity failed because the id provided is already in use')\n }\n }\n }\n\n // If is not defined, then is a entity created in runtime (what we called dynamic/runtime entities).\n NetworkEntity.createOrReplace(entityId, networkValue)\n SyncComponents.createOrReplace(entityId, { componentIds })\n }\n\n /**\n * Returns an iterable of all the childrens of the given entity.\n * for (const children of getChildren(parent)) { console.log(children) }\n * or just => const childrens: Entity[] = Array.from(getChildren(parent))\n */\n function* getChildren(parent: Entity): Iterable {\n const network = NetworkEntity.getOrNull(parent)\n if (network) {\n for (const [entity, parent] of engine.getEntitiesWith(NetworkParent)) {\n if (parent.entityId === network.entityId && parent.networkId === network.networkId) {\n yield entity\n }\n }\n }\n }\n\n function getFirstChild(entity: Entity) {\n return Array.from(getChildren(entity))[0]\n }\n\n /**\n * Returns the parent entity of the given entity.\n */\n function getParent(child: Entity): Entity | undefined {\n const parent = NetworkParent.getOrNull(child)\n if (!parent) return undefined\n for (const [entity, network] of engine.getEntitiesWith(NetworkEntity)) {\n if (parent.networkId === network.networkId && parent.entityId === network.entityId) {\n return entity\n }\n }\n return undefined\n }\n\n /**\n * Adds the network parenting to sync entities.\n * Equivalent to Transform.parent for local entities\n */\n function parentEntity(entity: Entity, parent: Entity) {\n const network = NetworkEntity.getOrNull(parent)\n if (!network) {\n throw new Error('Entity is not sync. Call syncEntity on the parent.')\n }\n\n // Create network parent component\n NetworkParent.createOrReplace(entity, network)\n\n // If we dont have a transform for this entity, create an empty one to send it to the renderer\n if (!Transform.getOrNull(entity)) {\n Transform.create(entity)\n } else {\n // We force to send a tick update of the transform so we can send the NEW parent to the renderer\n Transform.getMutable(entity)\n }\n }\n\n /**\n * Removes the network parenting from an entity\n */\n function removeParent(entity: Entity) {\n const network = NetworkEntity.getOrNull(entity)\n\n if (!network) {\n throw new Error('Entity is not sync')\n }\n\n NetworkParent.deleteFrom(entity)\n }\n\n return {\n syncEntity,\n getChildren,\n getParent,\n parentEntity,\n removeParent,\n getFirstChild\n }\n}\n", "import { IEngine, Transport } from '@dcl/ecs'\nimport type { SendBinaryRequest, SendBinaryResponse } from '~system/CommunicationsController'\n\nimport { syncFilter } from './filter'\nimport { engineToCrdt } from './state'\nimport { serializeCrdtMessages } from '../internal/transports/logger'\nimport { BinaryMessageBus, CommsMessage } from './binary-message-bus'\nimport {\n definePlayersInScene,\n fetchProfile,\n oldestUser as _oldestUser,\n setInitialized,\n stateInitialized,\n stateInitializedChecker,\n syncTransportIsReady\n} from './utils'\nimport { entityUtils } from './entities'\nimport { GetUserDataRequest, GetUserDataResponse } from '~system/UserIdentity'\n\nexport type IProfile = { networkId: number; userId: string }\n// user that we asked for the inital crdt state\nexport function addSyncTransport(\n engine: IEngine,\n sendBinary: (msg: SendBinaryRequest) => Promise,\n getUserData: (value: GetUserDataRequest) => Promise\n) {\n definePlayersInScene(engine)\n // Profile Info\n const myProfile: IProfile = {} as IProfile\n fetchProfile(myProfile!, getUserData)\n\n // Entity utils\n const entityDefinitions = entityUtils(engine, myProfile)\n\n // List of MessageBuss messsages to be sent on every frame to comms\n const pendingMessageBusMessagesToSend: Uint8Array[] = []\n const binaryMessageBus = BinaryMessageBus((message) => pendingMessageBusMessagesToSend.push(message))\n function getMessagesToSend() {\n const messages = [...pendingMessageBusMessagesToSend]\n pendingMessageBusMessagesToSend.length = 0\n return messages\n }\n\n // Add Sync Transport\n const transport: Transport = {\n filter: syncFilter(engine),\n send: async (message: Uint8Array) => {\n if (syncTransportIsReady(engine) && message.byteLength) {\n // console.log(Array.from(serializeCrdtMessages('[send CRDT]: ', message, engine)))\n binaryMessageBus.emit(CommsMessage.CRDT, message)\n }\n const messages = getMessagesToSend()\n const response = await sendBinary({ data: messages })\n binaryMessageBus.__processMessages(response.data)\n },\n type: 'network'\n }\n engine.addTransport(transport)\n // End add sync transport\n\n // Add state intialized checker\n engine.addSystem(() => stateInitializedChecker(engine, myProfile, entityDefinitions.syncEntity))\n\n // Request initial state\n binaryMessageBus.emit(CommsMessage.REQ_CRDT_STATE, new Uint8Array())\n\n // If we dont have any state initialized, and recieve a state message.\n binaryMessageBus.on(CommsMessage.RES_CRDT_STATE, (value) => {\n // console.log(Array.from(serializeCrdtMessages('[binaryMessageBus]: ', value, engine)))\n if (!stateInitialized) {\n setInitialized()\n transport.onmessage!(value)\n }\n })\n\n // If we are the oldest user and we recieve a req of a state we send it.\n binaryMessageBus.on(CommsMessage.REQ_CRDT_STATE, () => {\n // TODO: oldest not working because connectedPlayers returns players that are not in the scene.\n // Not working :sadcat:\n // const oldest = oldestUser(engine, myProfile, entityDefinitions.syncEntity)\n if (stateInitialized) {\n binaryMessageBus.emit(CommsMessage.RES_CRDT_STATE, engineToCrdt(engine))\n }\n })\n\n // Process CRDT messages here\n binaryMessageBus.on(CommsMessage.CRDT, (value) => {\n // console.log(Array.from(serializeCrdtMessages('[CRDT on]: ', value, engine)))\n\n transport.onmessage!(value)\n })\n\n return {\n ...entityDefinitions,\n myProfile\n }\n}\n", "import { Entity, Transform } from '@dcl/sdk/ecs'\nimport { Vector3, Quaternion } from '@dcl/sdk/math'\n\n/**\n * Remaps a value from one range of values to its equivalent, scaled in proportion to another range of values, using maximum and minimum.\n *\n * @param value - value input number\n * @param min1 - min1 Minimum value in the range of the input.\n * @param max1 - max1 Maximum value in the range of the input.\n * @param min2 - min2 Minimum value in the range of the output.\n * @param max2 - max2 Maximum value in the range of the output.\n * @returns The resulting remapped value between the new min and max\n * @public\n */\nexport function remap(\n value: number,\n min1: number,\n max1: number,\n min2: number,\n max2: number\n) {\n let range1 = max1 - min1\n let range2 = max2 - min2\n return ((value - min1) / range1) * range2 + min2\n}\n\n/**\n * Returns the position of an entity that is a child of other entities, relative to the scene instead of relative to the parent. Returns a Vector3.\n *\n * @param entity - Entity to calculate position\n * @returns The Entity's global position relative to the scene's origin\n * @public\n */\nexport function getWorldPosition(entity: Entity): Vector3 {\n let transform = Transform.getOrNull(entity)\n\n if (!transform)\n return Vector3.Zero()\n\n let parent = transform.parent\n\n if (!parent) {\n return transform.position\n } else {\n let parentRotation = Transform.get(parent).rotation\n return Vector3.add(getWorldPosition(parent), Vector3.rotate(transform.position, parentRotation))\n }\n}\n\n/**\n * Returns the position of an entity that is a child of other entities, relative to the scene instead of relative to the parent. Returns a Vector3.\n *\n * @param entity - Entity to calculate position\n * @returns The Entity's global rotation in reference to the scene's origin\n * @public\n */\nexport function getWorldRotation(entity: Entity): Quaternion {\n let transform = Transform.getOrNull(entity)\n\n if (!transform)\n return Quaternion.Identity()\n\n let parent = transform.parent\n\n if (!parent) {\n return transform.rotation\n } else {\n return Quaternion.multiply(transform.rotation, getWorldRotation(parent))\n }\n}\n\n/**\n * @public\n */\nexport enum InterpolationType {\n LINEAR = 'linear',\n\n EASEINQUAD = 'easeinquad',\n EASEOUTQUAD = 'easeoutquad',\n EASEQUAD = 'easequad',\n\n EASEINSINE = 'easeinsine',\n EASEOUTSINE = 'easeoutsine',\n EASESINE = 'easeinoutsine',\n\n EASEINEXPO = 'easeinexpo',\n EASEOUTEXPO = 'easeoutexpo',\n EASEEXPO = 'easeinoutexpo',\n\n EASEINELASTIC = 'easeinelastic',\n EASEOUTELASTIC = 'easeoutelastic',\n EASEELASTIC = 'easeinoutelastic',\n\n EASEINBOUNCE = 'easeinbounce',\n EASEOUTEBOUNCE = 'easeoutbounce',\n EASEBOUNCE = 'easeinoutbounce',\n}\n\n/**\n * @public\n */\nexport function interpolate(type: InterpolationType, t: number): number {\n switch (type) {\n case InterpolationType.LINEAR:\n return InterpolateLinear(t)\n case InterpolationType.EASEINQUAD:\n return InterpolateEaseInQuad(t)\n case InterpolationType.EASEOUTQUAD:\n return InterpolateEaseOutQuad(t)\n case InterpolationType.EASEQUAD:\n return InterpolateEaseQuad(t)\n\t case InterpolationType.EASEINSINE:\n\t\t return InterpolateEaseInSine(t)\n case InterpolationType.EASEOUTSINE:\n return InterpolateEaseOutSine(t)\n case InterpolationType.EASESINE:\n return InterpolateEaseInOutSine(t)\n case InterpolationType.EASEINEXPO:\n return InterpolateEaseInExpo(t)\n case InterpolationType.EASEOUTEXPO:\n return InterpolateEaseOutExpo(t)\n case InterpolationType.EASEEXPO:\n return InterpolateEaseInOutExpo(t)\n case InterpolationType.EASEINELASTIC:\n return InterpolateEaseInElastic(t)\n case InterpolationType.EASEOUTELASTIC:\n return InterpolateEaseOutElastic(t)\n case InterpolationType.EASEELASTIC:\n return InterpolateEaseInOutElastic(t)\n case InterpolationType.EASEINBOUNCE:\n return InterpolateEaseInBounce(t)\n case InterpolationType.EASEOUTEBOUNCE:\n return InterpolateEaseOutBounce(t)\n case InterpolationType.EASEBOUNCE:\n return InterpolateEaseInOutBounce(t)\n default:\n return InterpolateLinear(t)\n }\n}\n\nfunction InterpolateLinear(t: number): number {\n return t\n}\n\nfunction InterpolateEaseInQuad(t: number): number {\n return t * t\n}\n\nfunction InterpolateEaseOutQuad(t: number): number {\n return t * (2 - t)\n}\n\nfunction InterpolateEaseQuad(t: number): number {\n return (t * t) / (2.0 * (t * t - t) + 1.0)\n}\n\nfunction InterpolateEaseInSine(t: number): number {\n\treturn 1 - Math.cos((t * Math.PI) / 2)\n}\n\nfunction InterpolateEaseOutSine(t: number): number {\n\treturn Math.sin((t * Math.PI) / 2)\n}\n\nfunction InterpolateEaseInOutSine(t: number): number {\n\treturn -(Math.cos(Math.PI * t) - 1) / 2\n}\n\nfunction InterpolateEaseInExpo(t: number): number {\n\treturn t === 0 ? 0 : Math.pow(2, 10 * t - 10)\n}\n\nfunction InterpolateEaseOutExpo(t: number): number {\n\treturn t === 1 ? 1 : 1 - Math.pow(2, -10 * t)\n}\n\nfunction InterpolateEaseInOutExpo(t: number): number {\n\treturn t === 0\n\t\t\t? 0\n\t\t\t: t === 1\n\t\t\t? 1\n\t\t\t: t < 0.5\n\t\t\t? Math.pow(2, 20 * t - 10) / 2\n\t\t\t: (2 - Math.pow(2, -20 * t + 10)) / 2\n}\n\n\nfunction InterpolateEaseInElastic(t: number): number {\n\tconst c4 = (2 * Math.PI) / 3\n\t\n\treturn t === 0\n\t\t\t? 0\n\t\t\t: t === 1\n\t\t\t? 1\n\t\t\t: -Math.pow(2, 10 * t - 10) * Math.sin((t * 10 - 10.75) * c4)\n}\n\nfunction InterpolateEaseOutElastic(t: number): number {\n\tconst c5 = (2 * Math.PI) / 3\n\t\n\treturn t === 0\n\t\t\t? 0\n\t\t\t: t === 1\n\t\t\t? 1\n\t\t\t: Math.pow(2, -10 * t) * Math.sin((t * 10 - 0.75) * c5) + 1\n}\n\nfunction InterpolateEaseInOutElastic(t: number): number {\n\tconst c6 = (2 * Math.PI) / 4.5\n\t\n\treturn t === 0\n\t\t\t? 0\n\t\t\t: t === 1\n\t\t\t? 1\n\t\t\t: t < 0.5\n\t\t\t? -(Math.pow(2, 20 * t - 10) * Math.sin((20 * t - 11.125) * c6)) / 2\n\t\t\t: (Math.pow(2, -20 * t + 10) * Math.sin((20 * t - 11.125) * c6)) / 2 + 1\n}\n\nfunction InterpolateEaseInBounce(t: number): number {\n\treturn 1 - bounce(1 - t)\n}\n\nfunction InterpolateEaseOutBounce(t: number): number {\n\treturn bounce(t)\n}\n\nfunction InterpolateEaseInOutBounce(t: number): number {\n\treturn t < 0.5 ? (1 - bounce(1 - 2 * t)) / 2 : (1 + bounce(2 * t - 1)) / 2\n}\n\nfunction bounce(x: number) {\n\tconst n1 = 7.5625\n\tconst d1 = 2.75\n\n\tif (x < 1 / d1) {\n\t\treturn n1 * x * x\n\t} else if (x < 2 / d1) {\n\t\treturn n1 * (x -= 1.5 / d1) * x + 0.75\n\t} else if (x < 2.5 / d1) {\n\t\treturn n1 * (x -= 2.25 / d1) * x + 0.9375\n\t} else {\n\t\treturn n1 * (x -= 2.625 / d1) * x + 0.984375\n\t}\n}\n\nexport function createCatmullRomSpline(points: Vector3[], nbPoints: number, closed?: boolean): Vector3[] {\n\tconst catmullRom = new Array();\n\tconst step = 1.0 / nbPoints;\n\tlet amount = 0.0;\n\tif (closed) {\n\t\tconst pointsCount = points.length;\n\t\tfor (let i = 0; i < pointsCount; i++) {\n\t\t\tamount = 0;\n\t\t\tfor (let c = 0; c < nbPoints; c++) {\n\t\t\t\tcatmullRom.push(\n\t\t\t\t\tVector3.catmullRom(points[i % pointsCount], points[(i + 1) % pointsCount], points[(i + 2) % pointsCount], points[(i + 3) % pointsCount], amount)\n\t\t\t\t);\n\t\t\t\tamount += step;\n\t\t\t}\n\t\t}\n\t\tcatmullRom.push(catmullRom[0]);\n\t} else {\n\t\tconst totalPoints = new Array();\n\t\ttotalPoints.push(Vector3.clone(points[0]));\n\t\tArray.prototype.push.apply(totalPoints, points);\n\t\ttotalPoints.push(Vector3.clone(points[points.length - 1]));\n\t\tlet i = 0;\n\t\tfor (; i < totalPoints.length - 3; i++) {\n\t\t\tamount = 0;\n\t\t\tfor (let c = 0; c < nbPoints; c++) {\n\t\t\t\tcatmullRom.push(Vector3.catmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount));\n\t\t\t\tamount += step;\n\t\t\t}\n\t\t}\n\t\ti--;\n\t\tcatmullRom.push(Vector3.catmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount));\n\t}\n\treturn catmullRom;\n}\n\nexport function areAABBIntersecting(aMin: Vector3, aMax: Vector3, bMin: Vector3, bMax: Vector3): boolean {\n\treturn (\n\t\taMin.x <= bMax.x &&\n\t\taMax.x >= bMin.x &&\n\t\taMin.y <= bMax.y &&\n\t\taMax.y >= bMin.y &&\n\t\taMin.z <= bMax.z &&\n\t\taMax.z >= bMin.z\n\t)\n}\n\nexport function areSpheresIntersecting(aPos: Vector3, aRadius: number, bPos: Vector3, bRadius: number): boolean {\n const sqDist = Vector3.distanceSquared(aPos, bPos)\n const radiusSum = aRadius + bRadius\n return sqDist < radiusSum * radiusSum\n}\n\nexport function areAABBSphereIntersecting(boxMin: Vector3, boxMax: Vector3, spherePos: Vector3, sphereRadius: number): boolean {\n let dmin = 0\n\n if (spherePos.x < boxMin.x)\n dmin += (boxMin.x - spherePos.x) * (boxMin.x - spherePos.x)\n if (spherePos.x > boxMax.x)\n dmin += (spherePos.x - boxMax.x) * (spherePos.x - boxMax.x)\n if (spherePos.y < boxMin.y)\n dmin += (boxMin.y - spherePos.y) * (boxMin.y - spherePos.y)\n if (spherePos.y > boxMax.y)\n dmin += (spherePos.y - boxMax.y) * (spherePos.y - boxMax.y)\n if (spherePos.z < boxMin.z)\n dmin += (boxMin.z - spherePos.z) * (boxMin.z - spherePos.z)\n if (spherePos.z > boxMax.z)\n dmin += (spherePos.z - boxMax.z) * (spherePos.z - boxMax.z)\n\n return dmin < sphereRadius * sphereRadius\n}\n", "const REGULAR_PRIORITY = 100e3\n\nexport namespace priority {\n export const TimerSystemPriority = REGULAR_PRIORITY + 256\n export const TweenSystemPriority = REGULAR_PRIORITY + 192\n export const PerpetualMotionSystemPriority = REGULAR_PRIORITY + 192\n export const PathSystemPriority = REGULAR_PRIORITY + 192\n export const TriggerSystemPriority = REGULAR_PRIORITY + 128\n export const ActionSystemPriority = REGULAR_PRIORITY + 64\n}\n", "import { engine, Entity, IEngine, TransformType, Schemas, Transform } from '@dcl/sdk/ecs'\nimport { priority } from './priority'\n\nexport type Timers = ReturnType\n\nexport type Callback = () => void\n\nexport type TimerId = number\n\nfunction createTimers(targetEngine: IEngine) {\n type TimerData = {\n accumulatedTime: number,\n interval: number,\n recurrent: boolean,\n callback: Callback\n }\n\n const timers: Map = new Map()\n let timerIdCounter = 0\n\n function system(dt: number) {\n let deadTimers = []\n let callbacks = []\n\n for (let [timerId, timerData] of timers) {\n timerData.accumulatedTime += 1000 * dt\n if (timerData.accumulatedTime < timerData.interval)\n continue\n\n callbacks.push(timerData.callback)\n\n if (timerData.recurrent) {\n timerData.accumulatedTime -= Math.floor(timerData.accumulatedTime / timerData.interval) * timerData.interval\n } else {\n deadTimers.push(timerId)\n }\n }\n\n for (let timerId of deadTimers)\n timers.delete(timerId)\n \n for (let callback of callbacks)\n callback()\n }\n\n targetEngine.addSystem(system, priority.TimerSystemPriority)\n\n return {\n setTimeout(callback: Callback, milliseconds: number): TimerId {\n let timerId = timerIdCounter++\n timers.set(timerId, {callback: callback, interval: milliseconds, recurrent: false, accumulatedTime: 0})\n return timerId\n },\n clearTimeout(timer: TimerId) {\n timers.delete(timer)\n },\n setInterval(callback: Callback, milliseconds: number): TimerId {\n let timerId = timerIdCounter++\n timers.set(timerId, {callback: callback, interval: milliseconds, recurrent: true, accumulatedTime: 0})\n return timerId\n },\n clearInterval(timer: TimerId) {\n timers.delete(timer)\n }\n }\n}\n\nexport const timers = createTimers(engine)\n", "import { engine, Entity, EntityState, IEngine, Schemas } from '@dcl/sdk/ecs'\nimport { timers, Timers } from './timer';\n\nexport enum ToggleState {\n Off = 0,\n On = 1\n}\n\nexport type ToggleCallback = (state: ToggleState) => void\n\nexport type Toggles = ReturnType\n\nfunction createToggles(targetEngine: IEngine, timers: Timers) {\n const Toggle = targetEngine.defineComponent('dcl.utils.Toggle', {\n state: Schemas.EnumNumber(ToggleState, ToggleState.Off)\n })\n\n let toggles: Map = new Map();\n\n timers.setInterval(function () {\n for (const entity of toggles.keys()) {\n if (targetEngine.getEntityState(entity) == EntityState.Removed || !Toggle.has(entity)) {\n toggles.delete(entity)\n }\n }\n }, 5000)\n\n return {\n addToggle(entity: Entity, state: ToggleState, callback?: ToggleCallback) {\n toggles.set(entity, callback)\n Toggle.createOrReplace(entity, {state: state})\n },\n removeToggle(entity: Entity) {\n toggles.delete(entity)\n Toggle.deleteFrom(entity)\n },\n setCallback(entity: Entity, callback?: ToggleCallback) {\n toggles.set(entity, callback)\n },\n set(entity: Entity, state: ToggleState) {\n const oldState = Toggle.get(entity).state\n if (oldState != state) {\n Toggle.getMutable(entity).state = state\n const callback = toggles.get(entity)\n if (callback)\n callback(state)\n }\n },\n flip(entity: Entity) {\n this.set(entity, 1 - Toggle.get(entity).state) \n },\n isOn(entity: Entity) {\n return Toggle.get(entity).state == ToggleState.On\n }\n }\n}\n\nexport const toggles = createToggles(engine, timers)\n", "import { engine, Entity, IEngine, TransformType, Schemas, Transform, EntityState } from '@dcl/sdk/ecs'\nimport { Scalar, Vector3, Quaternion } from '@dcl/sdk/math'\nimport { InterpolationType, interpolate } from './math'\nimport { priority } from './priority'\n\nexport type OnFinishCallback = () => void\n\nexport type Tweens = ReturnType\n\nfunction createTweens(targetEngine: IEngine) {\n const Vector3TweenSchema = {\n start: Schemas.Vector3,\n end: Schemas.Vector3,\n interpolationType: Schemas.EnumString(InterpolationType, InterpolationType.LINEAR),\n speed: Schemas.Float,\n normalizedTime: Schemas.Float\n }\n const PositionTween = targetEngine.defineComponent('dcl.utils.PositionTween', Vector3TweenSchema)\n const ScaleTween = targetEngine.defineComponent('dcl.utils.ScaleTween', Vector3TweenSchema)\n const RotationTween = targetEngine.defineComponent('dcl.utils.RotationTween', {\n start: Schemas.Quaternion,\n end: Schemas.Quaternion,\n interpolationType: Schemas.EnumString(InterpolationType, InterpolationType.LINEAR),\n speed: Schemas.Float,\n normalizedTime: Schemas.Float\n })\n\n type FinishCallbackMap = Map\n\n const positionFinishCbs: FinishCallbackMap = new Map()\n const rotationFinishCbs: FinishCallbackMap = new Map()\n const scaleFinishCbs: FinishCallbackMap = new Map()\n\n function makeSystem(\n tweenType: typeof PositionTween | typeof RotationTween,\n callbacks: FinishCallbackMap,\n transformer: (transform: TransformType, start: any, end: any, lerpTime: number) => void,\n ) {\n return function system(dt: number) {\n const deadTweens = []\n\n for (const entity of callbacks.keys()) {\n if (targetEngine.getEntityState(entity) == EntityState.Removed || !tweenType.has(entity)) {\n callbacks.delete(entity)\n continue\n }\n\n const tween = tweenType.getMutable(entity)\n tween.normalizedTime = Scalar.clamp(tween.normalizedTime + dt * tween.speed, 0, 1)\n const lerpTime = interpolate(tween.interpolationType, tween.normalizedTime)\n\n transformer(Transform.getMutable(entity), tween.start, tween.end, lerpTime)\n\n if (tween.normalizedTime >= 1)\n deadTweens.push(entity)\n }\n\n for (const entity of deadTweens) {\n const callback = callbacks.get(entity)\n tweenType.deleteFrom(entity)\n callbacks.delete(entity)\n if (callback)\n callback()\n }\n }\n }\n\n function makeStop(tweenType: typeof PositionTween | typeof RotationTween, callbacks: FinishCallbackMap) {\n return function(entity: Entity) {\n tweenType.deleteFrom(entity)\n callbacks.delete(entity)\n }\n }\n\n function makeStart(tweenType: any, callbacks: FinishCallbackMap) {\n return function(\n entity: Entity,\n start: V,\n end: V,\n duration: number,\n interpolationType: InterpolationType = InterpolationType.LINEAR,\n onFinish?: OnFinishCallback\n ) {\n callbacks.set(entity, onFinish)\n tweenType.createOrReplace(entity, {\n start: start,\n end: end,\n speed: duration == 0 ? 0 : 1 / duration,\n interpolationType: interpolationType,\n normalizedTime: duration == 0 ? 1 : 0\n }) \n }\n }\n\n function makeGetOnFinishCallback(callbacks: FinishCallbackMap) {\n return function (entity: Entity) {\n if (!callbacks.has(entity))\n throw new Error(`Entity ${entity} is not registered with tweens system`)\n return callbacks.get(entity)\n }\n }\n\n targetEngine.addSystem(makeSystem(PositionTween, positionFinishCbs, function(transform, start, end, time) {\n transform.position = Vector3.lerp(start, end, time)\n }), priority.TweenSystemPriority)\n targetEngine.addSystem(makeSystem(RotationTween, rotationFinishCbs, function(transform, start, end, time) {\n transform.rotation = Quaternion.slerp(start, end, time)\n }), priority.TweenSystemPriority)\n targetEngine.addSystem(makeSystem(ScaleTween, scaleFinishCbs, function(transform, start, end, time) {\n transform.scale = Vector3.lerp(start, end, time)\n }), priority.TweenSystemPriority)\n\n return {\n startTranslation: makeStart(PositionTween, positionFinishCbs),\n stopTranslation: makeStop(PositionTween, positionFinishCbs),\n startRotation: makeStart(RotationTween, rotationFinishCbs),\n stopRotation: makeStop(RotationTween, rotationFinishCbs),\n startScaling: makeStart(ScaleTween, scaleFinishCbs),\n stopScaling: makeStop(ScaleTween, scaleFinishCbs),\n getTranslationOnFinishCallback: makeGetOnFinishCallback(positionFinishCbs),\n getRotationOnFinishCallback: makeGetOnFinishCallback(rotationFinishCbs),\n getScalingOnFinishCallback: makeGetOnFinishCallback(scaleFinishCbs)\n }\n}\n\nexport const tweens = createTweens(engine)\n", "import { engine, Entity, IEngine, Schemas, Transform } from '@dcl/sdk/ecs'\nimport { Quaternion } from '@dcl/sdk/math'\nimport { priority } from './priority'\n\nexport type PerpetualMotions = ReturnType\n\nfunction createPerpetualMotions(targetEngine: IEngine) {\n const PerpetualRotation = targetEngine.defineComponent('dcl.utils.PerpetualRotation', {\n velocity: Schemas.Quaternion\n })\n\n function system(dt: number) {\n for (const [entity, rotation] of targetEngine.getEntitiesWith(PerpetualRotation, Transform)) {\n const rotationDelta = Quaternion.slerp(Quaternion.Identity(), rotation.velocity, dt)\n const transform = Transform.getMutable(entity)\n transform.rotation = Quaternion.normalize(Quaternion.multiply(transform.rotation, rotationDelta))\n }\n }\n\n targetEngine.addSystem(system, priority.PerpetualMotionSystemPriority)\n\n return {\n startRotation(entity: Entity, velocity: Quaternion) {\n PerpetualRotation.createOrReplace(entity, {velocity: velocity})\n },\n stopRotation(entity: Entity) {\n PerpetualRotation.deleteFrom(entity)\n }\n }\n}\n\nexport const perpetualMotions = createPerpetualMotions(engine)\n", "import { engine, Entity, EntityState, IEngine, Schemas, Transform } from '@dcl/sdk/ecs'\nimport { Scalar, Vector3, Quaternion } from '@dcl/sdk/math'\nimport { createCatmullRomSpline } from './math'\nimport { priority } from './priority'\n\nexport type Paths = ReturnType\n\nexport type OnFinishCallback = () => void\nexport type OnPointReachedCallback = (pointIndex: number, point: Vector3, nextPoint: Vector3) => void\n\nfunction createPaths(targetEngine: IEngine) {\n const FollowPath = targetEngine.defineComponent('dcl.utils.FollowPath', {\n points: Schemas.Array(Schemas.Vector3),\n faceDirection: Schemas.Boolean,\n speed: Schemas.Number,\n normalizedTime: Schemas.Number,\n currentIndex: Schemas.Number,\n segmentTimes: Schemas.Array(Schemas.Number),\n curveSegmentCount: Schemas.Number\n })\n\n type FinishCallbackMap = Map\n type OnPointReachedCallbackMap = Map\n\n const finishCbs: FinishCallbackMap = new Map()\n const pointReachedCbs: OnPointReachedCallbackMap = new Map()\n\n function unregisterEntity(entity: Entity) {\n finishCbs.delete(entity)\n pointReachedCbs.delete(entity)\n FollowPath.deleteFrom(entity)\n }\n\n function system(dt: number) {\n const deadPaths = []\n const pointReachedPaths = []\n\n for (const entity of finishCbs.keys()) {\n if (targetEngine.getEntityState(entity) == EntityState.Removed || !FollowPath.has(entity)) {\n unregisterEntity(entity)\n continue\n }\n\n const transform = Transform.getMutable(entity)\n const path = FollowPath.getMutable(entity)\n path.normalizedTime = Scalar.clamp(path.normalizedTime + dt * path.speed, 0, 1)\n if (path.normalizedTime >= 1)\n deadPaths.push(entity)\n\n while (\n path.normalizedTime >= path.segmentTimes[path.currentIndex] &&\n path.currentIndex < path.points.length - 1\n ) {\n if (path.faceDirection) {\n const direction = Vector3.subtract(path.points[path.currentIndex + 1], path.points[path.currentIndex])\n transform.rotation = Quaternion.lookRotation(direction)\n }\n if (path.currentIndex > 0 && path.currentIndex % path.curveSegmentCount == 0) {\n const pointIndex = path.currentIndex / path.curveSegmentCount\n const pointCoords = path.points[path.currentIndex]\n const nextPointCoords = path.points[path.currentIndex + path.curveSegmentCount]\n pointReachedPaths.push({entity: entity, index: pointIndex, coords: pointCoords, nextCoords: nextPointCoords})\n }\n path.currentIndex += 1\n }\n\n const timeDiff = path.segmentTimes[path.currentIndex] - path.segmentTimes[path.currentIndex - 1]\n const coef = (path.segmentTimes[path.currentIndex] - path.normalizedTime) / timeDiff\n transform.position = Vector3.lerp(path.points[path.currentIndex], path.points[path.currentIndex - 1], coef)\n }\n\n for (const pointReached of pointReachedPaths) {\n const callback = pointReachedCbs.get(pointReached.entity)\n if (callback) {\n callback(pointReached.index, pointReached.coords, pointReached.nextCoords)\n }\n }\n\n for (const entity of deadPaths) {\n const callback = finishCbs.get(entity)\n unregisterEntity(entity)\n if (callback)\n callback()\n }\n }\n\n targetEngine.addSystem(system, priority.PathSystemPriority)\n\n function startPath(\n entity: Entity,\n points: Vector3[],\n duration: number,\n faceDirection?: boolean,\n curveSegmentCount?: number,\n onFinishCallback?: OnFinishCallback,\n onPointReachedCallback?: OnPointReachedCallback\n ) {\n if (points.length < 2)\n throw new Error('At least 2 points are required to form a path.')\n\n if (duration == 0)\n throw new Error('Path duration must not be zero')\n\n if (curveSegmentCount) {\n const loop = Vector3.equals(points[0], points[points.length - 1])\n if (loop) {\n points.pop()\n points.unshift(points.pop()!)\n }\n points = createCatmullRomSpline(points, curveSegmentCount, loop)\n } else {\n curveSegmentCount = 1\n }\n\n finishCbs.set(entity, onFinishCallback)\n pointReachedCbs.set(entity, onPointReachedCallback)\n\n let totalLength = 0\n const segmentLengths = []\n for (let i = 0; i < points.length - 1; i++) {\n let sqDist = Vector3.distance(points[i], points[i + 1])\n totalLength += sqDist\n segmentLengths.push(sqDist)\n }\n\n const segmentTimes = [0]\n for (let i = 0; i < segmentLengths.length; i++) {\n segmentTimes.push(segmentLengths[i] / totalLength + segmentTimes[i])\n }\n\n FollowPath.createOrReplace(entity, {\n points: points,\n segmentTimes: segmentTimes,\n curveSegmentCount: curveSegmentCount,\n speed: 1 / duration,\n normalizedTime: 0,\n currentIndex: 0,\n faceDirection: faceDirection\n })\n }\n\n return {\n startStraightPath(\n entity: Entity,\n points: Vector3[],\n duration: number,\n faceDirection?: boolean,\n onFinishCallback?: OnFinishCallback,\n onPointReachedCallback?: OnPointReachedCallback\n ) {\n return startPath(entity, points, duration, faceDirection, 0, onFinishCallback, onPointReachedCallback)\n },\n startSmoothPath(\n entity: Entity,\n points: Vector3[],\n duration: number,\n segmentCount: number,\n faceDirection?: boolean,\n onFinishCallback?: OnFinishCallback,\n onPointReachedCallback?: OnPointReachedCallback\n ) {\n if (segmentCount < 2 || !Number.isInteger(segmentCount))\n throw new Error(`segmentCount must be an integer that is greater than 2, got: ${segmentCount}`)\n return startPath(entity, points, duration, faceDirection, segmentCount, onFinishCallback, onPointReachedCallback)\n },\n stopPath(entity: Entity) {\n unregisterEntity(entity)\n },\n getOnFinishCallback(entity: Entity) {\n if (!finishCbs.has(entity))\n throw new Error(`Entity ${entity} is not registered in triggers system`)\n return finishCbs.get(entity)\n }\n }\n}\n\nexport const paths = createPaths(engine)\n", "import { engine, Entity, IEngine, MeshRenderer, Schemas, Transform, Material, DeepReadonly, EntityState } from '@dcl/sdk/ecs'\nimport { Vector3, Color4, Color3 } from '@dcl/sdk/math'\nimport { getWorldPosition, getWorldRotation, areAABBIntersecting, areAABBSphereIntersecting, areSpheresIntersecting } from './math'\nimport { priority } from './priority'\n\nexport const LAYER_1 = 1\nexport const LAYER_2 = 2\nexport const LAYER_3 = 4\nexport const LAYER_4 = 8\nexport const LAYER_5 = 16\nexport const LAYER_6 = 32\nexport const LAYER_7 = 64\nexport const LAYER_8 = 128\nexport const ALL_LAYERS = 255\nexport const NO_LAYERS = 0\n\nexport let PLAYER_LAYER_ID = LAYER_1\n\nexport type TriggerBoxAreaSpec = {\n\ttype: 'box',\n\tposition?: Vector3,\n\tscale?: Vector3\n}\nexport type TriggerSphereAreaSpec = {\n\ttype: 'sphere',\n\tposition?: Vector3,\n\tradius?: number\n}\nexport type TriggerAreaSpec = TriggerBoxAreaSpec | TriggerSphereAreaSpec\n\nexport type TriggerBoxArea = {\n\tposition: Vector3,\n\tscale: Vector3\n}\nexport type TriggerSphereArea = {\n\tposition: Vector3,\n\tradius: number\n}\nexport type TriggerArea = { $case: 'box', value: TriggerBoxArea } | { $case: 'sphere', value: TriggerSphereArea }\n\ntype OnTriggerEnterCallback = (entity: Entity) => void\ntype OnTriggerExitCallback = (entity: Entity) => void\n\nexport type Triggers = ReturnType\n\nfunction createTriggers(targetEngine: IEngine) {\n\tconst Trigger = engine.defineComponent('dcl.utils.Trigger', {\n\t\tactive: Schemas.Boolean,\n\t\tlayerMask: Schemas.Int,\n\t\ttriggeredByMask: Schemas.Int,\n\t\tareas: Schemas.Array(Schemas.OneOf({\n\t\t\tbox: Schemas.Map({\n\t\t\t\tposition: Schemas.Vector3,\n\t\t\t\tscale: Schemas.Vector3\n\t\t\t}),\n\t\t\tsphere: Schemas.Map({\n\t\t\t\tposition: Schemas.Vector3,\n\t\t\t\tradius: Schemas.Number\n\t\t\t})\n\t\t})),\n\t\tdebugColor: Schemas.Color3\n\t})\n\n\ttype TriggerType = {\n\t\tactive: boolean,\n\t\tlayerMask: number,\n\t\ttriggeredByMask: number,\n\t\tareas: Array,\n\t\tdebugColor: Color3\n\t}\n\n\tconst triggerEnterCbs: Map = new Map()\n\tconst triggerExitCbs: Map = new Map()\n\n\tlet debugDraw = false\n\tconst activeCollisions: Map> = new Map()\n\tconst debugEntities: Map> = new Map()\n\n\tfunction updateDebugDraw(enabled: boolean) {\n\t\tif (!enabled)\n\t\t\treturn\n\n\t\tfor (const [entity, trigger] of targetEngine.getEntitiesWith(Trigger, Transform)) {\n\t\t\tlet shapes = debugEntities.get(entity)!\n\n\t\t\tconst areaCount = trigger.areas.length\n\t\t\twhile (shapes.length > areaCount) {\n\t\t\t\ttargetEngine.removeEntity(shapes.pop()!)\n\t\t\t}\n\t\t\twhile (shapes.length < areaCount) {\n\t\t\t\tshapes.push(targetEngine.addEntity())\n\t\t\t}\n\n\t\t\tconst worldPosition = getWorldPosition(entity)\n\t\t\tconst worldRotation = getWorldRotation(entity)\n\n\t\t\tfor (let i = 0; i < areaCount; ++i) {\n\t\t\t\tconst shapeSpec = trigger.areas[i]\n\t\t\t\tconst shape = shapes[i]\n\n\t\t\t\tlet scale\n\t\t\t\tif (shapeSpec.$case == 'box') {\n\t\t\t\t\tscale = shapeSpec.value.scale\n\t\t\t\t\tMeshRenderer.setBox(shape)\n\t\t\t\t} else {\n\t\t\t\t\tconst radius = shapeSpec.value.radius\n\t\t\t\t\tscale = { x: radius, y: radius, z: radius }\n\t\t\t\t\tMeshRenderer.setSphere(shape)\n\t\t\t\t}\n\n\t\t\t\tTransform.createOrReplace(shape, {\n\t\t\t\t\tposition: Vector3.add(worldPosition, Vector3.rotate(shapeSpec.value.position, worldRotation)),\n\t\t\t\t\tscale: scale\n\t\t\t\t})\n\n\t\t\t\tconst color = trigger.active ? trigger.debugColor : Color3.Black()\n\t\t\t\tMaterial.setPbrMaterial(shape, { albedoColor: Color4.fromInts(255 * color.r, 255 * color.g, 255 * color.b, 75) })\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction areTriggersIntersecting(\n\t\tshapeWorldPos0: Array,\n\t\tt0: DeepReadonly,\n\t\tshapeWorldPos1: Array,\n\t\tt1: DeepReadonly\n\t): boolean {\n\t\tfor (let i = 0; i < t0.areas.length; ++i) {\n\t\t\tconst t0World = shapeWorldPos0[i]\n\t\t\tconst t0Area = t0.areas[i]\n\n\t\t\tif (t0Area.$case == 'box') {\n\t\t\t\tconst t0Box = t0Area.value\n\t\t\t\tconst t0Min = Vector3.subtract(t0World, Vector3.scale(t0Box.scale, 0.5))\n\t\t\t\tconst t0Max = Vector3.add(t0Min, t0Box.scale)\n\n\t\t\t\tfor (let j = 0; j < t1.areas.length; ++j) {\n\t\t\t\t\tconst t1World = shapeWorldPos1[j]\n\t\t\t\t\tconst t1Area = t1.areas[j]\n\n\t\t\t\t\tif (t1Area.$case == 'box') {\n\t\t\t\t\t\tconst t1Box = t1Area.value\n\t\t\t\t\t\tconst t1Min = Vector3.subtract(t1World, Vector3.scale(t1Box.scale, 0.5))\n\t\t\t\t\t\tconst t1Max = Vector3.add(t1Min, t1Box.scale)\n\n\t\t\t\t\t\tif (areAABBIntersecting(t0Min, t0Max, t1Min, t1Max))\n\t\t\t\t\t\t\treturn true\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (areAABBSphereIntersecting(t0Min, t0Max, t1World, t1Area.value.radius))\n\t\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst t0Radius = t0Area.value.radius\n\n\t\t\t\tfor (let j = 0; j < t1.areas.length; ++j) {\n\t\t\t\t\tconst t1World = shapeWorldPos1[j]\n\t\t\t\t\tconst t1Area = t1.areas[j]\n\n\t\t\t\t\tif (t1Area.$case == 'box') {\n\t\t\t\t\t\tconst t1Box = t1Area.value\n\t\t\t\t\t\tconst t1Min = Vector3.subtract(t1World, Vector3.scale(t1Box.scale, 0.5))\n\t\t\t\t\t\tconst t1Max = Vector3.add(t1Min, t1Box.scale)\n\n\t\t\t\t\t\tif (areAABBSphereIntersecting(t1Min, t1Max, t0World, t0Radius))\n\t\t\t\t\t\t\treturn true\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (areSpheresIntersecting(t0World, t0Radius, t1World, t1Area.value.radius))\n\t\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\tfunction computeCollisions(entity: Entity, shapeWorldPos: Map>) {\n\t\tlet collisions: Set = EMPTY_IMMUTABLE_SET\n\t\tconst trigger = Trigger.get(entity)\n\n\t\tif (!trigger.active)\n\t\t\treturn collisions\n\n\n\t\tif (trigger.triggeredByMask == PLAYER_LAYER_ID) {\n\t\t\t// check just player \n\t\t\tconst playerEntity = targetEngine.PlayerEntity\n\t\t\tconst playerTrigger = Trigger.get(targetEngine.PlayerEntity)\n\n\t\t\tif (playerEntity == entity)\n\t\t\t\treturn collisions\n\n\t\t\tif (!playerTrigger.active)\n\t\t\t\treturn collisions\n\n\t\t\tif (!(trigger.triggeredByMask & playerTrigger.layerMask))\n\t\t\t\treturn collisions\n\n\t\t\tconst intersecting = areTriggersIntersecting(shapeWorldPos.get(entity)!, trigger, shapeWorldPos.get(playerEntity)!, playerTrigger)\n\t\t\tif (intersecting) {\n\t\t\t\tif (collisions === EMPTY_IMMUTABLE_SET) collisions = new Set()\n\t\t\t\tcollisions.add(playerEntity)\n\t\t\t}\n\t\t} else {\n\t\t\t// iterate over full list of triggers\n\t\t\tfor (const [otherEntity, otherTrigger] of targetEngine.getEntitiesWith(Trigger, Transform)) {\n\t\t\t\tif (otherEntity == entity)\n\t\t\t\t\tcontinue\n\n\t\t\t\tif (!otherTrigger.active)\n\t\t\t\t\tcontinue\n\n\t\t\t\tif (!(trigger.triggeredByMask & otherTrigger.layerMask))\n\t\t\t\t\tcontinue\n\n\t\t\t\tconst intersecting = areTriggersIntersecting(shapeWorldPos.get(entity)!, trigger, shapeWorldPos.get(otherEntity)!, otherTrigger)\n\t\t\t\tif (intersecting) {\n\t\t\t\t\tif (collisions === EMPTY_IMMUTABLE_SET) collisions = new Set()\n\t\t\t\t\tcollisions.add(otherEntity)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\n\t\treturn collisions\n\t}\n\n\tfunction updateCollisions() {\n\t\tconst collisionsStarted = []\n\t\tconst collisionsEnded = []\n\t\tconst shapeWorldPositions: Map> = new Map()\n\n\t\tfor (const entity of activeCollisions.keys()) {\n\t\t\tif (targetEngine.getEntityState(entity) == EntityState.Removed || !Trigger.has(entity)) {\n\t\t\t\tfor (const debugEntity of debugEntities.get(entity)!)\n\t\t\t\t\ttargetEngine.removeEntity(debugEntity)\n\n\t\t\t\tfor (const collisions of activeCollisions.values()) {\n\t\t\t\t\tif (collisions.has(entity))\n\t\t\t\t\t\tcollisions.delete(entity)\n\t\t\t\t}\n\n\t\t\t\tdebugEntities.delete(entity)\n\t\t\t\tactiveCollisions.delete(entity)\n\t\t\t\ttriggerEnterCbs.delete(entity)\n\t\t\t\ttriggerExitCbs.delete(entity)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tconst positions = []\n\t\t\tconst entityWorldPosition = getWorldPosition(entity)\n\t\t\tconst entityWorldRotation = getWorldRotation(entity)\n\t\t\tconst trigger = Trigger.get(entity)\n\n\t\t\tfor (const shape of trigger.areas) {\n\t\t\t\tpositions.push(Vector3.add(entityWorldPosition, Vector3.rotate(shape.value.position, entityWorldRotation)))\n\t\t\t}\n\t\t\tshapeWorldPositions.set(entity, positions)\n\t\t}\n\n\t\tfor (const entity of activeCollisions.keys()) {\n\t\t\tconst newCollisions = computeCollisions(entity, shapeWorldPositions)\n\t\t\tconst oldCollisions = activeCollisions.get(entity)!\n\n\t\t\tfor (const oldCollision of oldCollisions) {\n\t\t\t\tif (!newCollisions.has(oldCollision))\n\t\t\t\t\tcollisionsEnded.push([entity, oldCollision])\n\t\t\t}\n\n\t\t\tfor (const newCollision of newCollisions) {\n\t\t\t\tif (!oldCollisions.has(newCollision))\n\t\t\t\t\tcollisionsStarted.push([entity, newCollision])\n\t\t\t}\n\n\t\t\tactiveCollisions.set(entity, newCollisions)\n\t\t}\n\n\t\tfor (const [entity, collision] of collisionsStarted) {\n\t\t\tconst callback = triggerEnterCbs.get(entity)\n\t\t\tif (callback)\n\t\t\t\tcallback(collision)\n\t\t}\n\n\t\tfor (const [entity, collision] of collisionsEnded) {\n\t\t\tconst callback = triggerExitCbs.get(entity)\n\t\t\tif (callback)\n\t\t\t\tcallback(collision)\n\t\t}\n\t}\n\n\tfunction system(dt: number) {\n\t\tupdateCollisions()\n\t\tupdateDebugDraw(debugDraw)\n\t}\n\n\ttargetEngine.addSystem(system, priority.TriggerSystemPriority)\n\n\tfunction triggerAreasFromSpec(areas?: Array) {\n\t\tif (!areas)\n\t\t\tareas = [{ type: 'box' }]\n\n\t\tconst triggerAreas: Array = []\n\n\t\tfor (const area of areas) {\n\t\t\tif (area.type == 'box') {\n\t\t\t\ttriggerAreas.push({\n\t\t\t\t\t$case: 'box',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\tposition: area.position ? area.position : Vector3.Zero(),\n\t\t\t\t\t\tscale: area.scale ? area.scale : Vector3.One()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\ttriggerAreas.push({\n\t\t\t\t\t$case: 'sphere',\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\tposition: area.position ? area.position : Vector3.Zero(),\n\t\t\t\t\t\tradius: area.radius ? area.radius : 1\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\treturn triggerAreas\n\t}\n\n\tconst triggersInterface = {\n\t\taddTrigger(\n\t\t\tentity: Entity,\n\t\t\tlayerMask: number = NO_LAYERS,\n\t\t\ttriggeredByMask: number = NO_LAYERS,\n\t\t\tareas?: Array,\n\t\t\tonEnterCallback?: OnTriggerEnterCallback,\n\t\t\tonExitCallback?: OnTriggerExitCallback,\n\t\t\tdebugColor?: Color3\n\t\t) {\n\t\t\tif (layerMask < 0 || layerMask > ALL_LAYERS || !Number.isInteger(layerMask))\n\t\t\t\tthrow new Error(`Bad layerMask: ${layerMask}. Expected a non-negative integer no greater than ${ALL_LAYERS}`)\n\n\t\t\tif (triggeredByMask < 0 || triggeredByMask > ALL_LAYERS || !Number.isInteger(triggeredByMask))\n\t\t\t\tthrow new Error(`Bad triggeredByMask: ${triggeredByMask}. Expected a non-negative integer no greater than ${ALL_LAYERS}`)\n\n\t\t\tdebugEntities.set(entity, [])\n\t\t\tactiveCollisions.set(entity, new Set())\n\t\t\ttriggerEnterCbs.set(entity, onEnterCallback)\n\t\t\ttriggerExitCbs.set(entity, onExitCallback)\n\n\t\t\tTrigger.createOrReplace(entity, {\n\t\t\t\tactive: true,\n\t\t\t\tlayerMask: layerMask,\n\t\t\t\ttriggeredByMask: triggeredByMask,\n\t\t\t\tareas: triggerAreasFromSpec(areas),\n\t\t\t\tdebugColor: debugColor ? debugColor : Color3.Red()\n\t\t\t})\n\t\t},\n\t\tremoveTrigger(entity: Entity) {\n\t\t\tconst collisions = activeCollisions.get(entity)!\n\t\t\tconst callback = triggerExitCbs.get(entity)\n\n\t\t\tfor (const debugEntity of debugEntities.get(entity)!)\n\t\t\t\ttargetEngine.removeEntity(debugEntity)\n\n\t\t\tdebugEntities.delete(entity)\n\t\t\tactiveCollisions.delete(entity)\n\t\t\ttriggerEnterCbs.delete(entity)\n\t\t\ttriggerExitCbs.delete(entity)\n\t\t\tTrigger.deleteFrom(entity)\n\n\t\t\tconst collidingEntities = []\n\t\t\tfor (const [otherEntity, otherEntityCollisions] of activeCollisions) {\n\t\t\t\tif (otherEntityCollisions.has(entity)) {\n\t\t\t\t\totherEntityCollisions.delete(entity)\n\t\t\t\t\tcollidingEntities.push(otherEntity)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (callback) {\n\t\t\t\tfor (const collision of collisions)\n\t\t\t\t\tcallback(collision)\n\t\t\t}\n\n\t\t\tfor (const otherEntity of collidingEntities) {\n\t\t\t\tconst callback = triggerExitCbs.get(otherEntity)\n\t\t\t\tif (callback)\n\t\t\t\t\tcallback(entity)\n\t\t\t}\n\t\t},\n\t\toneTimeTrigger(\n\t\t\tentity: Entity,\n\t\t\tlayerMask: number = NO_LAYERS,\n\t\t\ttriggeredByMask: number = NO_LAYERS,\n\t\t\tareas?: Array,\n\t\t\tonEnterCallback?: OnTriggerEnterCallback,\n\t\t\tdebugColor?: Color3\n\t\t) {\n\t\t\tthis.addTrigger(entity, layerMask, triggeredByMask, areas, function (e) {\n\t\t\t\ttriggers.removeTrigger(entity)\n\t\t\t\tif (onEnterCallback)\n\t\t\t\t\tonEnterCallback(e)\n\t\t\t}, undefined, debugColor)\n\t\t},\n\t\tenableTrigger(entity: Entity, enabled: boolean) {\n\t\t\tTrigger.getMutable(entity).active = enabled\n\t\t},\n\t\tisTriggerEnabled(entity: Entity) {\n\t\t\treturn Trigger.get(entity).active\n\t\t},\n\t\tgetLayerMask(entity: Entity) {\n\t\t\treturn Trigger.get(entity).layerMask\n\t\t},\n\t\tsetLayerMask(entity: Entity, mask: number) {\n\t\t\tif (mask < 0 || mask > ALL_LAYERS || !Number.isInteger(mask))\n\t\t\t\tthrow new Error(`Bad layerMask: ${mask}. Expected a non-negative integer no greater than ${ALL_LAYERS}`)\n\t\t\tTrigger.getMutable(entity).layerMask = mask\n\t\t},\n\t\tgetTriggeredByMask(entity: Entity) {\n\t\t\treturn Trigger.get(entity).triggeredByMask\n\t\t},\n\t\tsetTriggeredByMask(entity: Entity, mask: number) {\n\t\t\tif (mask < 0 || mask > ALL_LAYERS || !Number.isInteger(mask))\n\t\t\t\tthrow new Error(`Bad layerMask: ${mask}. Expected a non-negative integer no greater than ${ALL_LAYERS}`)\n\t\t\tTrigger.getMutable(entity).triggeredByMask = mask\n\t\t},\n\t\tgetAreas(entity: Entity) {\n\t\t\treturn Trigger.get(entity).areas\n\t\t},\n\t\tsetAreas(entity: Entity, areas: Array) {\n\t\t\tTrigger.getMutable(entity).areas = triggerAreasFromSpec(areas)\n\t\t},\n\t\tsetOnEnterCallback(entity: Entity, callback: OnTriggerEnterCallback) {\n\t\t\ttriggerEnterCbs.set(entity, callback)\n\t\t},\n\t\tsetOnExitCallback(entity: Entity, callback: OnTriggerExitCallback) {\n\t\t\ttriggerExitCbs.set(entity, callback)\n\t\t},\n\t\tenableDebugDraw(enabled: boolean) {\n\t\t\tdebugDraw = enabled\n\t\t\tif (!enabled) {\n\t\t\t\tfor (const shapes of debugEntities.values()) {\n\t\t\t\t\tfor (const shape of shapes)\n\t\t\t\t\t\ttargetEngine.removeEntity(shape)\n\t\t\t\t\tshapes.length = 0\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tisDebugDrawEnabled() {\n\t\t\treturn debugDraw\n\t\t}\n\t}\n\n\ttriggersInterface.addTrigger(\n\t\ttargetEngine.PlayerEntity, PLAYER_LAYER_ID, NO_LAYERS,\n\t\t[{\n\t\t\ttype: 'box',\n\t\t\tscale: { x: 0.65, y: 1.92, z: 0.65 },\n\t\t\tposition: { x: 0, y: 0.15, z: 0 }\n\t\t}],\n\t\tundefined, undefined, Color3.Green()\n\t)\n\n\treturn triggersInterface\n}\n\nexport const triggers = createTriggers(engine)\n\n\nconst EMPTY_IMMUTABLE_SET: Set = new Set()\n\nEMPTY_IMMUTABLE_SET.add = (entity: Entity) => { debugger; throw new Error(\"EMPTY_SET is read only\") }\nEMPTY_IMMUTABLE_SET.delete = (entity: Entity) => { throw new Error(\"EMPTY_SET is read only\") }\nEMPTY_IMMUTABLE_SET.has = (entity: Entity) => { return false }\n", "import { IEngine, SystemFn } from '@dcl/sdk/ecs'\nimport { priority } from './priority'\n\nexport namespace actions {\n\n export class SequenceRunner {\n private beginSequenceNode: SequenceNode | null = null\n private currentSequenceNode: SequenceNode | null = null\n\n private engine: IEngine\n private systemFn: SystemFn\n\n private running: boolean = false\n private started: boolean = false\n\n private onFinishCallback?: () => void\n\n constructor(\n targetEngine: IEngine,\n sequenceBuilt?: SequenceBuilder,\n onFinishCallback?: () => void\n ) {\n this.engine = targetEngine\n this.systemFn = (dt) => { this.update(dt) }\n this.engine.addSystem(this.systemFn, priority.ActionSystemPriority)\n if (sequenceBuilt) {\n this.startSequence(sequenceBuilt)\n }\n if (onFinishCallback)\n this.setOnFinishCallback(onFinishCallback)\n }\n \n startSequence(sequenceBuilt: SequenceBuilder) {\n this.beginSequenceNode = sequenceBuilt.beginSequenceNode\n this.currentSequenceNode = this.beginSequenceNode\n this.running = true\n this.started = false\n }\n\n destroy() {\n this.engine.removeSystem(this.systemFn)\n }\n\n setOnFinishCallback(onFinishCallback: () => void) {\n this.onFinishCallback = onFinishCallback\n }\n\n isRunning(): boolean {\n return this.running\n }\n\n stop() {\n this.running = false\n }\n\n resume() {\n if (this.beginSequenceNode != null)\n this.running = true\n }\n\n reset() {\n this.currentSequenceNode = this.beginSequenceNode\n this.running = true\n this.started = false\n }\n\n getRunningAction(): IAction | null {\n let currentNode: SequenceNode | null = this.currentSequenceNode\n\n if (this.currentSequenceNode instanceof SubSequenceNode) {\n do {\n currentNode = (currentNode as SubSequenceNode).currentInnerSequence\n } while (currentNode instanceof SubSequenceNode)\n }\n return (currentNode as SequenceNode).action\n }\n\n private update(dt: number): void {\n if (!this.running)\n return\n \n if (!this.started) {\n (this.currentSequenceNode as SequenceNode).onStart()\n this.started = true\n return\n }\n \n if (!(this.currentSequenceNode as SequenceNode).hasFinish()) {\n (this.currentSequenceNode as SequenceNode).update(dt)\n return\n }\n\n (this.currentSequenceNode as SequenceNode).onFinish()\n this.currentSequenceNode = (this.currentSequenceNode as SequenceNode).next\n if (this.currentSequenceNode) {\n this.currentSequenceNode.onStart()\n } else {\n this.running = false\n if (this.onFinishCallback) this.onFinishCallback()\n }\n }\n }\n\n export interface IAction {\n onStart(): void\n update(dt: number): void\n onFinish(): void\n hasFinished: boolean\n }\n\n export class SequenceBuilder {\n private currentSequenceNode: SequenceNode | null = null\n public beginSequenceNode: SequenceNode | null = null\n\n private whileNodeStack: WhileSequenceNode[] = []\n\n then(action: IAction): SequenceBuilder {\n if (this.currentSequenceNode == null) {\n this.currentSequenceNode = new SequenceNode()\n this.currentSequenceNode.action = action\n this.beginSequenceNode = this.currentSequenceNode\n } else {\n let next = new SequenceNode()\n next.action = action\n this.currentSequenceNode = this.currentSequenceNode.then(next)\n }\n return this\n }\n\n if(condition: () => boolean): SequenceBuilder {\n let ifSeq = new IfSequenceNode(condition)\n if (this.currentSequenceNode == null) {\n this.currentSequenceNode = ifSeq\n this.beginSequenceNode = ifSeq\n } else {\n this.currentSequenceNode = this.currentSequenceNode.then(ifSeq)\n }\n return this\n }\n\n else(): SequenceBuilder {\n let seq = (this.currentSequenceNode as SequenceNode).getSequence()\n if (seq instanceof IfSequenceNode) {\n seq.closed = true\n let elseSeq = new ElseSequenceNode(seq)\n this.currentSequenceNode = (this\n .currentSequenceNode as SequenceNode).then(elseSeq)\n } else {\n throw new Error(\n 'IF statement is needed to be called before ELSE statement.'\n )\n }\n return this\n }\n\n endIf(): SequenceBuilder {\n let seq = (this.currentSequenceNode as SequenceNode).getSequence()\n if (seq instanceof IfSequenceNode || seq instanceof ElseSequenceNode) {\n seq.closed = true\n } else {\n throw new Error(\n 'IF statement is needed to be called before ENDIF statement.'\n )\n }\n return this\n }\n\n while(condition: () => boolean): SequenceBuilder {\n let whileSeq = new WhileSequenceNode(condition)\n if (this.currentSequenceNode == null) {\n this.currentSequenceNode = whileSeq\n this.beginSequenceNode = whileSeq\n } else {\n this.currentSequenceNode = this.currentSequenceNode.then(whileSeq)\n }\n this.whileNodeStack.push(whileSeq)\n return this\n }\n\n endWhile(): SequenceBuilder {\n let seq = (this.currentSequenceNode as SequenceNode).getSequence()\n if (seq instanceof WhileSequenceNode) {\n seq.closed = true\n if (this.whileNodeStack.length > 0) {\n this.whileNodeStack.splice(this.whileNodeStack.length - 1, 1)\n }\n } else {\n throw new Error(\n 'WHILE statement is needed to be called before ENDWHILE statement.'\n )\n }\n return this\n }\n\n breakWhile(): SequenceBuilder {\n if (this.whileNodeStack.length > 0) {\n this.currentSequenceNode = (this\n .currentSequenceNode as SequenceNode).then(\n new BreakWhileSequenceNode(\n this.whileNodeStack[this.whileNodeStack.length - 1]\n )\n )\n } else {\n throw new Error(\n 'WHILE statement is needed to be called before BREAKWHILE statement.'\n )\n }\n return this\n }\n }\n\n export class SequenceNode {\n action: IAction | null = null\n next: SequenceNode | null = null\n \n then(next: SequenceNode): SequenceNode {\n this.next = next\n return next\n }\n \n onStart() {\n if (this.action) this.action.onStart()\n }\n \n update(dt: number) {\n if (this.action) this.action.update(dt)\n }\n \n onFinish() {\n if (this.action) this.action.onFinish()\n }\n \n hasFinish(): boolean {\n if (this.action) return this.action.hasFinished\n else return true\n }\n \n getSequence(): SequenceNode {\n return this\n }\n }\n \n class SubSequenceNode extends SequenceNode {\n currentInnerSequence: SequenceNode | null = null\n startingInnerSequence: SequenceNode | null = null\n closed: boolean = false\n \n then(next: SequenceNode): SequenceNode {\n if (this.currentInnerSequence == null) {\n this.currentInnerSequence = next\n this.startingInnerSequence = next\n } else {\n if (this.closed) {\n this.next = next\n return next\n } else {\n this.currentInnerSequence = this.currentInnerSequence.then(next)\n }\n }\n return this\n }\n \n onStart() {\n this.currentInnerSequence = this.startingInnerSequence\n if (this.currentInnerSequence) this.currentInnerSequence.onStart()\n }\n \n update(dt: number) {\n if (this.currentInnerSequence) {\n if (!this.currentInnerSequence.hasFinish()) {\n this.currentInnerSequence.update(dt)\n } else {\n this.currentInnerSequence.onFinish()\n this.currentInnerSequence = this.currentInnerSequence.next\n if (this.currentInnerSequence) this.currentInnerSequence.onStart()\n }\n }\n }\n \n onFinish() {\n if (this.currentInnerSequence) this.currentInnerSequence.onFinish()\n }\n \n hasFinish(): boolean {\n return this.currentInnerSequence == null\n }\n \n getSequence(): SequenceNode {\n if (this.currentInnerSequence) {\n let innerSeq = this.currentInnerSequence.getSequence()\n if (innerSeq instanceof SubSequenceNode) {\n if (!innerSeq.closed) {\n return innerSeq\n }\n }\n }\n return this\n }\n }\n \n class IfSequenceNode extends SubSequenceNode {\n condition: () => boolean\n result: boolean = false\n \n constructor(condition: () => boolean) {\n super()\n this.condition = condition\n }\n \n onStart() {\n this.result = this.condition()\n if (this.result) super.onStart()\n else this.currentInnerSequence = null\n }\n }\n \n class ElseSequenceNode extends SubSequenceNode {\n ifSequence: IfSequenceNode | null = null\n \n constructor(ifSequence: IfSequenceNode) {\n super()\n this.ifSequence = ifSequence\n }\n \n onStart() {\n if (this.ifSequence && !this.ifSequence.result) super.onStart()\n else this.currentInnerSequence = null\n }\n }\n \n class WhileSequenceNode extends SubSequenceNode {\n condition: () => boolean\n breakWhile: boolean = false\n \n constructor(condition: () => boolean) {\n super()\n this.condition = condition\n }\n \n onStart() {\n this.breakWhile = false\n if (this.condition()) super.onStart()\n else this.currentInnerSequence = null\n }\n \n update(dt: number) {\n if (this.currentInnerSequence) {\n if (!this.currentInnerSequence.hasFinish()) {\n this.currentInnerSequence.update(dt)\n } else {\n this.currentInnerSequence.onFinish()\n this.currentInnerSequence = this.currentInnerSequence.next\n if (this.currentInnerSequence == null)\n this.currentInnerSequence = this.startingInnerSequence\n if (this.currentInnerSequence) this.currentInnerSequence.onStart()\n }\n }\n }\n \n hasFinish(): boolean {\n return this.breakWhile || !this.condition()\n }\n }\n \n class BreakWhileSequenceNode extends SequenceNode {\n whileNode: WhileSequenceNode\n \n constructor(whileNode: WhileSequenceNode) {\n super()\n this.whileNode = whileNode\n }\n \n onStart() {\n this.whileNode.breakWhile = true\n }\n }\n}\n", "import { Animator, Entity, GltfContainer, InputAction, PointerEvents, pointerEventsSystem } from \"@dcl/ecs\";\nimport { CuttingBoard, GrabableObjectComponent, IngredientType } from \"../definitions\";\nimport * as utils from '@dcl-sdk/utils'\n\nexport function cutSushi(entity: Entity, modelEntity: Entity) {\n\n let boardData = CuttingBoard.getMutable(entity)\n\n if (!boardData.hasRoll || boardData.cutting) return\n\n let ingredient = boardData.rollChild\n\n let ingredientData = GrabableObjectComponent.getMutable(ingredient)\n\n if (ingredientData.type != IngredientType.SushiRoll) {\n ruinFood(ingredient)\n }\n\n boardData.cutting = true\n boardData.cuts += 1\n\n\n switch (boardData.cuts) {\n case 1:\n Animator.playSingleAnimation(modelEntity, \"State1\", false)\n break;\n case 2:\n Animator.playSingleAnimation(modelEntity, \"State2\", false)\n break;\n case 3:\n Animator.playSingleAnimation(modelEntity, \"State3\", false)\n break;\n case 4:\n Animator.playSingleAnimation(modelEntity, \"State4\", false)\n break;\n case 5:\n Animator.playSingleAnimation(modelEntity, \"State5\", false)\n if (ingredientData.type != IngredientType.SushiRoll) return\n\n utils.timers.setTimeout(() => {\n ingredientData.type = IngredientType.SlicedSushi\n GltfContainer.getMutable(ingredient).src = \"assets/models/PlateSushi.glb\"\n }, 300)\n\n break;\n case 6:\n Animator.playSingleAnimation(modelEntity, \"State5\", false)\n ruinFood(ingredient)\n break;\n default:\n break;\n }\n\n\n utils.timers.setTimeout(() => {\n boardData.cutting = false\n }, 500)\n\n}\n\nexport function switchToCutMode(entity: Entity) {\n\n const pointerEvent = PointerEvents.getMutable(entity).pointerEvents[0]\n if (pointerEvent && pointerEvent.eventInfo) {\n pointerEvent.eventInfo.hoverText = \"Cut\"\n // pointerEvent.eventInfo.button = InputAction.IA_POINTER\n }\n}\n\nexport function switchToEmpty(entity: Entity) {\n\n const pointerEvent = PointerEvents.getMutable(entity).pointerEvents[0]\n if (pointerEvent && pointerEvent.eventInfo) {\n pointerEvent.eventInfo.hoverText = \"Put\"\n pointerEvent.eventInfo.button = InputAction.IA_PRIMARY\n }\n Animator.stopAllAnimations(entity, true)\n\n}\n\n\nexport function ruinFood(entity: Entity) {\n\n console.log(\"ruin food\")\n\n let objectData = GrabableObjectComponent.getMutable(entity)\n\n objectData.type = IngredientType.Trash\n\n GltfContainer.getMutable(entity).src = \"assets/models/GarbageFood.glb\"\n\n}", "import { Entity, Transform, MeshRenderer, Material, TransformType, engine, VisibilityComponent } from \"@dcl/sdk/ecs\";\nimport { ProgressBar } from \"../definitions\";\nimport { Color4, Vector3, Quaternion, Scalar } from \"@dcl/sdk/math\";\nimport { getParent, parentEntity, syncEntity } from \"@dcl/sdk/network\";\nimport { getSyncId } from \"./helpers\";\n\n\nexport function CreateProgressBar(parent: Entity, height?: number, yRotation?: number, movesUp?: boolean, startHidden?: boolean, speed?: number, id1?: number, id2?: number) {\n\n const background = engine.addEntity()\n Transform.create(background, {\n position: Vector3.create(0, height ? height : 1, 0),\n scale: Vector3.create(0.82, 0.15, 1),\n rotation: Quaternion.fromEulerDegrees(0, yRotation ? yRotation : 0, 0)\n })\n MeshRenderer.setPlane(background)\n\n if (!id1) {\n id1 = getSyncId(background)\n }\n\n\n syncEntity(background, [Transform.componentId, VisibilityComponent.componentId], id1)\n parentEntity(background, parent)\n\n const progressBar = engine.addEntity()\n Transform.create(progressBar, {\n position: Vector3.create(0, 0, -0.03),\n scale: Vector3.create(0.95, 0.8, 1)\n })\n MeshRenderer.setPlane(progressBar)\n\n Material.setBasicMaterial(progressBar, { diffuseColor: Color4.Green() })\n\n ProgressBar.create(progressBar, {\n parent: parent,\n color: Color4.Green(),\n movesUp: movesUp,\n ratio: movesUp ? 0 : 1,\n redWarning: movesUp ? 0.8 : 0.2,\n speed: speed ? speed : 1,\n visible: startHidden ? false : true,\n active: startHidden ? false : true,\n })\n\n if (!id2) {\n id2 = getSyncId(progressBar)\n }\n\n\n syncEntity(progressBar, [Transform.componentId, Material.componentId, VisibilityComponent.componentId], id2)\n parentEntity(progressBar, background)\n\n if (startHidden) {\n VisibilityComponent.create(background, { visible: false })\n VisibilityComponent.create(progressBar, { visible: false })\n\n }\n\n\n\n // TODO: IDS FOR PROGRESS BARS\n\n\n return progressBar\n\n\n}\n\n\n\n\nexport function ProgressBarUpdate(dt: number) {\n for (const [entity] of engine.getEntitiesWith(ProgressBar)) {\n const progressBar = ProgressBar.getMutable(entity);\n if (progressBar.active) {\n if (progressBar.movesUp) {\n progressBar.ratio += dt / 10 * progressBar.speed\n\n if (progressBar.ratio > progressBar.yellowWarning && progressBar.color == Color4.Green()) {\n changeBarColor(entity, Color4.Yellow())\n } else if (progressBar.ratio > progressBar.redWarning && progressBar.color != Color4.Red()) {\n changeBarColor(entity, Color4.Red())\n\n // DO SOMETHING?\n // smoke if parent = pot ??\n\n\n } else if (progressBar.ratio > progressBar.fullLength) {\n progressBar.ratio = 1\n progressBar.active = false\n\n // DO SOMETHING?\n }\n\n } else {\n progressBar.ratio -= dt / 10 * progressBar.speed\n if (progressBar.ratio < progressBar.yellowWarning && progressBar.color == Color4.Green()) {\n changeBarColor(entity, Color4.Yellow())\n } else if (progressBar.ratio < progressBar.redWarning && progressBar.color != Color4.Red()) {\n changeBarColor(entity, Color4.Red())\n\n // DO SOMETHING?\n // smoke if parent = pot ??\n\n\n } else if (progressBar.ratio <= 0) {\n progressBar.ratio = 0\n progressBar.active = false\n\n // DO SOMETHING?\n\n }\n }\n\n\n if (progressBar.ratio > progressBar.fullLength) {\n progressBar.active = false;\n\n }\n const transform = Transform.getMutable(entity);\n\n let width = Scalar.lerp(0, progressBar.fullLength, progressBar.ratio)\n transform.scale.x = width\n transform.position.x = -progressBar.fullLength / 2 + width / 2\n\n }\n\n }\n}\n\n\nexport function changeBarColor(entity: Entity, color: Color4) {\n const progressBar = ProgressBar.getMutable(entity)\n progressBar.color = color\n\n const material = Material.getMutable(entity)\n Material.setBasicMaterial(entity, { diffuseColor: color })\n\n\n // CHANGE ACTUAL BAR MATERIAL\n\n}\n\nexport function HideProgressBar(entity: Entity) {\n const progressBar = ProgressBar.getMutable(entity)\n progressBar.visible = false\n VisibilityComponent.createOrReplace(entity, { visible: false })\n\n const parent = getParent(entity)\n if (parent) {\n VisibilityComponent.createOrReplace(parent, { visible: false })\n }\n}\n\n\nexport function ResetProgressBar(entity: Entity) {\n //TODO\n const parent = getParent(entity)\n\n const barData = ProgressBar.getMutable(entity)\n barData.active = true\n if (barData.movesUp) {\n barData.ratio = 0\n } else {\n barData.ratio = 1\n }\n barData.color = Color4.Green()\n barData.visible = true\n\n if (VisibilityComponent.has(entity)) {\n VisibilityComponent.deleteFrom(entity)\n }\n\n if (parent && VisibilityComponent.has(parent)) {\n VisibilityComponent.deleteFrom(parent)\n }\n\n changeBarColor(entity, Color4.Green())\n}\n\n// export function RemoveProgressBar(entity: Entity) {\n// //TODO\n// const parent = getParent(entity)\n\n// if (parent) {\n// engine.removeEntityWithChildren(parent)\n// } else {\n// engine.removeEntityWithChildren(entity)\n// }\n\n// }", "import { Entity, Material, engine, Transform, TextShape, MeshRenderer, TextAlignMode, VisibilityComponent } from \"@dcl/sdk/ecs\";\nimport { SpeechBubbleType, SyncEntityIDs } from \"../definitions\";\nimport { Color4, Vector3, Quaternion } from \"@dcl/ecs-math\";\nimport { syncEntity, parentEntity, getChildren } from '@dcl/sdk/network'\nimport { getSyncId } from \"./helpers\";\n\nconst bubble1Texture = Material.Texture.Common({\n src: 'assets/textures/bubble.png',\n})\n\nconst bubble3Texture = Material.Texture.Common({\n src: 'assets/textures/bubble3.png',\n})\n\n\nexport function createSpeechBubble(parent: Entity, seatNumber: number, text: string, height?: number, bubbleType?: SpeechBubbleType) {\n\n\n let bubbleParentId = SyncEntityIDs.BUBBLE1_A\n let backgroundId = SyncEntityIDs.BUBBLE1_B\n let textId = SyncEntityIDs.BUBBLE1_C\n\n switch (seatNumber) {\n case 1:\n bubbleParentId = SyncEntityIDs.BUBBLE1_A\n backgroundId = SyncEntityIDs.BUBBLE1_B\n textId = SyncEntityIDs.BUBBLE1_C\n break;\n case 2:\n bubbleParentId = SyncEntityIDs.BUBBLE2_A\n backgroundId = SyncEntityIDs.BUBBLE2_B\n textId = SyncEntityIDs.BUBBLE2_C\n break;\n case 3:\n bubbleParentId = SyncEntityIDs.BUBBLE3_A\n backgroundId = SyncEntityIDs.BUBBLE3_B\n textId = SyncEntityIDs.BUBBLE3_C\n break;\n case 4:\n bubbleParentId = SyncEntityIDs.BUBBLE4_A\n backgroundId = SyncEntityIDs.BUBBLE4_B\n textId = SyncEntityIDs.BUBBLE4_C\n break;\n }\n\n\n const bubbleParent = engine.addEntity()\n Transform.create(bubbleParent, {\n position: Vector3.create(-1, 0, 0),\n rotation: Quaternion.fromEulerDegrees(0, 180, 0)\n })\n\n\n syncEntity(bubbleParent, [], bubbleParentId)\n parentEntity(bubbleParent, parent)\n\n\n const background = engine.addEntity()\n Transform.create(background, {\n position: Vector3.create(-0.6, height ? height - 0.35 : 0.65, 0),\n scale: Vector3.create(1.4, 1.6, 1),\n rotation: Quaternion.fromEulerDegrees(0, 0, 0)\n })\n MeshRenderer.setPlane(background)\n\n VisibilityComponent.createOrReplace(background, { visible: false })\n\n\n let texture = bubble1Texture\n let color = Color4.Gray()\n\n switch (bubbleType) {\n case SpeechBubbleType.Good:\n texture = bubble3Texture\n color = Color4.Green()\n break\n case SpeechBubbleType.Bad:\n texture = bubble3Texture\n color = Color4.Red()\n break\n }\n\n Material.setBasicMaterial(background, {\n diffuseColor: color,\n texture: texture,\n\n })\n\n syncEntity(background, [Material.componentId, Transform.componentId, VisibilityComponent.componentId], backgroundId)\n parentEntity(background, bubbleParent)\n\n const textEntity = engine.addEntity()\n\n Transform.create(textEntity, {\n position: Vector3.create(-1, height ? height - 0.1 : 0.9, -0.03),\n scale: Vector3.create(0.85, 0.85, 0.85),\n rotation: Quaternion.fromEulerDegrees(0, 0, 0)\n })\n\n TextShape.create(textEntity, {\n text: text,\n width: 1.1,\n height: 1.1,\n textAlign: TextAlignMode.TAM_MIDDLE_LEFT,\n fontSize: 1,\n })\n\n //const textParentId = getSyncId(textEntity)\n\n VisibilityComponent.createOrReplace(textEntity, { visible: false })\n\n syncEntity(textEntity, [TextShape.componentId, Transform.componentId, VisibilityComponent.componentId], textId)\n parentEntity(textEntity, bubbleParent)\n\n\n\n // TODO: Handle IDS for multiplayer\n\n\n return bubbleParent\n}\n\n\nexport function updateSpeechBubble(bubble: Entity, text: string, bubbleType?: SpeechBubbleType) {\n\n const children = Array.from(getChildren(bubble))\n let backgroundEntity: Entity | undefined = undefined\n let textEntity: Entity | undefined = undefined\n\n for (const ent of children) {\n VisibilityComponent.deleteFrom(ent)\n if (TextShape.has(ent)) {\n textEntity = ent\n }\n if (MeshRenderer.has(ent)) {\n backgroundEntity = ent\n }\n }\n\n if (!backgroundEntity || !textEntity) { return }\n\n\n let texture = bubble1Texture\n let color = Color4.Gray()\n\n switch (bubbleType) {\n case SpeechBubbleType.Good:\n texture = bubble3Texture\n color = Color4.Green()\n break\n case SpeechBubbleType.Bad:\n texture = bubble3Texture\n color = Color4.Red()\n break\n }\n\n Material.setBasicMaterial(backgroundEntity, {\n diffuseColor: color,\n texture: texture,\n\n })\n\n TextShape.getMutable(textEntity).text = text\n\n\n}\n\n\nexport function HideSpeechBubble(bubble: Entity) {\n\n const children = Array.from(getChildren(bubble))\n\n for (const ent of children) {\n VisibilityComponent.createOrReplace(ent, { visible: false })\n }\n\n}\n\n\n\n\nexport function RemoveSpeechBubble(bubble: Entity) {\n\n // TODO\n engine.removeEntityWithChildren(bubble)\n}\n", "import { GltfContainer, Animator, Transform, engine, Entity, TextShape, VisibilityComponent } from \"@dcl/sdk/ecs\"\nimport { Vector3, Scalar, Quaternion, Color4 } from '@dcl/sdk/math'\nimport { ProgressBar, CustomerData, IngredientType, SpeechBubbleType, BeerGlass, BeerType, GameData, SyncEntityIDs, GrabableObjectComponent } from \"../definitions\";\nimport { CreateProgressBar, HideProgressBar, ResetProgressBar } from \"./progressBars\";\nimport { HideSpeechBubble, RemoveSpeechBubble, createSpeechBubble, updateSpeechBubble } from \"./speechBubble\";\nimport { syncEntity, parentEntity } from '@dcl/sdk/network'\nimport * as utils from '@dcl-sdk/utils'\nimport { getPlayerPosition, playSound } from \"./helpers\";\n\nconst customerRawNoodleMessages = [\n \"Me like some \\nnoodles! Me like'em RAW!\",\n 'RAW noodles please, \\nand hurry!',\n 'Noodles! A nice \\ndry brick of RAW ones!',\n 'Noodles! \\nNO cooking for me',\n 'HARD RAW NOODLES'\n]\n\nconst customerRawSushiMessages = [\n 'They say you got \\nthe best rolls, \\ngimme! NO slicing!',\n 'One roll please. \\nIn ONE piece!',\n 'A full sushi roll \\nI can swallow in one gulp!',\n 'SUSHI. NO CUTTING.'\n]\n\nconst customerCookedNoodleMessages = [\n 'I want cooked \\nnoodles, NOW!',\n 'I... need... my... \\nhot... noodles...',\n 'Ramen Noodles, they \\nbetter be here soon.',\n \"Decentraland's best \\nramen huh? I'll try some\",\n 'A bowl of noodles, \\nplease'\n]\n\nconst customerSlicedSushiMessages = [\n 'sliced sushi! \\nonegai shimaaasu!',\n 'Sushi. Tic Toc.',\n 'Sushi dammit! \\nWhat rya waiting for?',\n 'Been exploring \\nDecentraland all day, \\nsushi please'\n]\n\nconst customerTrashMessages = [\n 'Noodles! Gimme \\nthe stinky ones!',\n 'Noodles, the burrrrrrrnt\\n the better!',\n 'Well-cooked noodles. \\nBurnt, as you people say.',\n \"They say you sell\\n garbage for food,\\n I'd like some\",\n \"Garbage, don't care\\n what kind\"\n]\n\nconst customerEmptyBeerMessages = [\n 'An empty beer glass. \\nSo it looks like I was \\nwaiting long',\n 'Just a glass, nothing\\n in it. \\nFeeling existential.',\n 'Empty glass. All I\\n can afford.',\n]\n\nconst customerYellowBeerMessages = [\n 'I want a cold regular\\n beer!',\n 'I heard you do craft\\n beer, gimme a yellow!',\n 'Beer! A nice cold normal\\n one!',\n]\n\nconst customerRedBeerMessages = [\n 'I want a RED beer!',\n 'Red beer. Im a \\nbit of a hipster!',\n 'Beer red like the \\nblood of my enemies! \\nlol',\n]\n\n\nconst customerGreenBeerMessages = [\n 'I like weird stuff, \\ngreen beer!',\n 'Green Beer. Dont care \\nabout the taste, want \\na cool pic for insagram',\n 'Beer! A nice cold \\ngreen one!',\n]\n\n\nconst customerLookingMessage = [\n 'Im just here to watch',\n 'I dont want anything. \\nJust here to make you \\nfeel uncomfortable.',\n 'Making a documentary, \\nkeep working as if \\nIm not here',\n]\n\n\n\nconst customerCorrectDishMessages = [\n 'Excellent!',\n 'Nicely done!',\n '(\u3000\uFF3E\u2207\uFF3E)',\n 'It was about time...',\n 'Nice job!',\n 'Just what I needed!',\n 'Yummy!',\n 'YES!!!',\n '( \u02D8 \u00B3\u02D8)',\n \"It's fine\"\n]\n\nconst customerWrongDishMessages = [\n 'Customer service \\nSUCKS here!',\n 'Do you even understand \\nmy language?',\n 'What a waste of time!',\n 'NO! NO! NO!',\n \"Guess who's a \\nramen shop critic?\",\n \"I'll never come \\nback here\",\n \"I'll talk SO bad \\nabout this place\",\n '\u0449(\u00BA\u0414\u00BA\u0449)',\n '@#&*#$!',\n '\u0B67\u0F3C\u0CA0\u76CA\u0CA0\u0F3D'\n]\n\nconst position1 = Vector3.create(13.5, 0.75, 10.5)\nconst position2 = Vector3.create(13.5, 0.75, 11.5)\nconst position3 = Vector3.create(13.5, 0.75, 12.5)\nconst position4 = Vector3.create(13.5, 0.75, 13.5)\n\n\nconst ACCELERATION_RATE: number = 0.99\n\nexport function CreateCustomer(seatNumber: number) {\n\n const customer = engine.addEntity()\n\n let position: Vector3 = Vector3.Zero()\n let customerSyncId: SyncEntityIDs = SyncEntityIDs.CUSTOMER1\n\n let progressBarIdA: SyncEntityIDs = SyncEntityIDs.PBAR1_A\n let progressBarIdB: SyncEntityIDs = SyncEntityIDs.PBAR1_B\n\n // TODO: dialog IDS\n\n switch (seatNumber) {\n case 1:\n position = position1;\n customerSyncId = SyncEntityIDs.CUSTOMER1\n progressBarIdA = SyncEntityIDs.PBAR1_A\n progressBarIdB = SyncEntityIDs.PBAR1_B\n break;\n case 2:\n position = position2;\n customerSyncId = SyncEntityIDs.CUSTOMER2\n progressBarIdA = SyncEntityIDs.PBAR2_A\n progressBarIdB = SyncEntityIDs.PBAR2_B\n break;\n case 3:\n position = position3;\n customerSyncId = SyncEntityIDs.CUSTOMER3\n progressBarIdA = SyncEntityIDs.PBAR3_A\n progressBarIdB = SyncEntityIDs.PBAR3_B\n break;\n case 4:\n position = position4;\n customerSyncId = SyncEntityIDs.CUSTOMER4\n progressBarIdA = SyncEntityIDs.PBAR4_A\n progressBarIdB = SyncEntityIDs.PBAR4_B\n break;\n }\n\n\n\n Transform.create(customer, {\n position: position,\n scale: Vector3.create(0.75, 0.75, 0.75),\n rotation: Quaternion.fromEulerDegrees(0, 90, 0)\n })\n\n // TODO: Add Shape randomization\n GltfContainer.create(customer, {\n src: \"assets/models/walkers/BlockDog.glb\",\n })\n Animator.create(customer)\n Animator.playSingleAnimation(customer, \"Sitting\", false)\n\n syncEntity(customer, [GltfContainer.componentId, Transform.componentId, CustomerData.componentId, Animator.componentId, VisibilityComponent.componentId], customerSyncId)\n\n const randomTime = Scalar.randomRange(3, 6)\n\n const progressBar = CreateProgressBar(customer, 1.3, 180, false, true, 0.1, progressBarIdA, progressBarIdB)\n\n\n const speechBubble = createSpeechBubble(customer, seatNumber, \"Placeholder\", 2.3)\n\n CustomerData.create(customer, {\n message: \"placeHolder\",\n speechBubble: speechBubble,\n receivedDish: false,\n seatNumber: seatNumber,\n //plate: CustomerPlate\n timeBeforeLeaving: Scalar.randomRange(3, 4),\n timeBeforeEntering: randomTime,\n waitingTimer: randomTime,\n progressBar: progressBar\n })\n\n VisibilityComponent.createOrReplace(customer, { visible: false })\n\n}\n\nexport function summonCustomer() {\n let takenSeats: number[] = []\n\n const [gameEntities] = engine.getEntitiesWith(GameData)\n const gameEntity = gameEntities[0]\n if (!gameEntity || !GameData.has(gameEntity)) return\n const gameData = GameData.getMutable(gameEntity)\n\n\n let customerCount = 0;\n for (const [customer] of engine.getEntitiesWith(CustomerData)) {\n if (CustomerData.get(customer).active) {\n customerCount++;\n takenSeats.push(CustomerData.get(customer).seatNumber)\n }\n }\n\n let seatNumber: number = 0\n\n if (customerCount > 4) return\n\n\n if (gameData.playerScore >= 150) {\n if (!takenSeats.includes(1)) {\n seatNumber = 1\n } else if (!takenSeats.includes(2)) {\n seatNumber = 2\n } else if (!takenSeats.includes(3)) {\n seatNumber = 3\n } else if (!takenSeats.includes(4)) {\n seatNumber = 4\n } else return\n\n } else if (gameData.playerScore >= 50) {\n console.log(\"CUSTOMER COUNT: \", customerCount, \"TAKEN SEATS: \", takenSeats)\n if (!takenSeats.includes(1)) {\n seatNumber = 1\n } else if (!takenSeats.includes(2)) {\n seatNumber = 2\n } else return\n } else {\n if (customerCount < 1) {\n seatNumber = 1\n } else return\n }\n\n console.log(\"SUMMONING NEW CUSTOMER, SEAT NUMBER: \", seatNumber, \"TAKEN SEATS \", takenSeats)\n\n for (const [customer] of engine.getEntitiesWith(CustomerData)) {\n console.log(\"ITERATING OVER CUSTOMERS\")\n if (CustomerData.get(customer).seatNumber == seatNumber) {\n resetCustomer(customer)\n }\n }\n}\n\n\nexport function hideCustomer(customer: Entity) {\n\n VisibilityComponent.createOrReplace(customer, { visible: false })\n\n const customerData = CustomerData.getMutable(customer)\n\n console.log(\"HIDING CUSTOMER: \", customerData.seatNumber)\n\n\n customerData.active = false\n customerData.receivedDish = false\n\n if (customerData.progressBar) {\n HideProgressBar(customerData.progressBar)\n }\n\n HideSpeechBubble(customerData.speechBubble)\n\n}\n\n\nexport function resetCustomer(customer: Entity) {\n\n const customerData = CustomerData.getMutable(customer)\n\n customerData.active = true\n customerData.waitingTimer = 10\n customerData.timeBeforeLeaving = 30\n customerData.timeBeforeEntering = 10\n customerData.receivedDish = false\n\n VisibilityComponent.deleteFrom(customer)\n Animator.playSingleAnimation(customer, \"Sitting\", false)\n\n ResetProgressBar(customerData.progressBar)\n\n const dish = Math.floor(Scalar.randomRange(0, 9))\n\n console.log(\"DISH SELECTED: \", dish)\n\n let messages: string[]\n switch (dish) {\n case 0:\n messages = customerRawNoodleMessages\n break\n case 1:\n messages = customerRawSushiMessages\n break\n case 2:\n messages = customerCookedNoodleMessages\n break\n case 3:\n messages = customerSlicedSushiMessages\n break\n case 4:\n messages = customerTrashMessages\n break\n case 5:\n messages = customerEmptyBeerMessages\n break\n case 6:\n messages = customerYellowBeerMessages\n break\n case 7:\n messages = customerRedBeerMessages\n break\n case 8:\n messages = customerGreenBeerMessages\n break\n default:\n messages = customerLookingMessage\n break\n }\n\n let randomIndex = Math.floor(Scalar.randomRange(0, messages.length))\n\n updateSpeechBubble(customerData.speechBubble, messages[randomIndex], SpeechBubbleType.Neutral)\n\n\n console.log(\"NEW TEXT: \", messages[randomIndex])\n\n customerData.dish = dish\n customerData.message = messages[randomIndex]\n\n}\n\n\n\nexport function CustomerSystem(dt: number) {\n\n // update progress bars\n for (const [entity] of engine.getEntitiesWith(CustomerData)) {\n\n const customerData = CustomerData.getMutable(entity)\n\n if (customerData.active && customerData.progressBar && ProgressBar.has(customerData.progressBar)) {\n\n const progressBar = ProgressBar.getMutable(customerData.progressBar)\n if (progressBar.speed > 0 && progressBar.ratio <= 0) {\n // Time's up for this order so we feed a wrong dish on purpose\n\n let wrongDish = customerData.dish + 1\n if (wrongDish == Object.keys(IngredientType).length) {\n wrongDish = 0\n }\n\n deliverOrder(wrongDish, entity)\n\n HideProgressBar(customerData.progressBar)\n\n }\n }\n\n if (customerData.receivedDish && customerData.waitingTimer > 0) {\n customerData.waitingTimer -= dt\n\n if (customerData.waitingTimer <= 0) {\n\n hideCustomer(entity)\n\n //engine.removeEntityWithChildren(entity)\n\n }\n\n\n }\n\n\n }\n\n // add new customers\n for (const [entity] of engine.getEntitiesWith(GameData)) {\n\n const gameData = GameData.getMutable(entity)\n\n gameData.customerTimer -= dt\n if (gameData.customerTimer <= 0) {\n summonCustomer()\n gameData.customerTimer = gameData.customerInterval\n gameData.customerInterval = gameData.customerInterval * ACCELERATION_RATE\n console.log(\"NEW CUSTOMER INTERVAL\", gameData.customerInterval)\n }\n }\n}\n\n\nexport function deliverOrder(dishType: number, customer: Entity, dish?: Entity) {\n\n\n const customerData = CustomerData.getMutable(customer)\n\n if (customerData.receivedDish) return\n\n if (customerData.progressBar) {\n HideProgressBar(customerData.progressBar)\n }\n\n\n // if (customerData.speechBubble) {\n // RemoveSpeechBubble(customerData.speechBubble)\n // }\n\n\n const [gameEntities] = engine.getEntitiesWith(GameData)\n const gameEntity = gameEntities[0]\n if (!gameEntity || !GameData.has(gameEntity)) return\n const gameData = GameData.getMutable(gameEntity)\n\n\n if (customerData.dish == dishType) {\n // Correct dish\n gameData.playerScore += 10\n updateScore()\n const message = customerCorrectDishMessages[Math.floor(Scalar.randomRange(0, customerCorrectDishMessages.length))]\n customerData.message = message\n\n updateSpeechBubble(customerData.speechBubble, message, SpeechBubbleType.Good)\n\n // const speechBubble = createSpeechBubble(customer, message, 2.3, SpeechBubbleType.Good)\n // customerData.speechBubble = speechBubble\n\n } else {\n // Wrong dish\n gameData.playerMisses += 1\n updateMisses()\n const message = customerWrongDishMessages[Math.floor(Scalar.randomRange(0, customerWrongDishMessages.length))]\n customerData.message = message\n\n updateSpeechBubble(customerData.speechBubble, message, SpeechBubbleType.Bad)\n\n // const speechBubble = createSpeechBubble(customer, message, 2.3, SpeechBubbleType.Bad)\n // customerData.speechBubble = speechBubble\n }\n\n\n customerData.receivedDish = true\n\n if (dish) {\n utils.timers.setTimeout(() => {\n\n if (BeerGlass.has(dish)) {\n\n BeerGlass.getMutable(dish).filled = false\n BeerGlass.getMutable(dish).beerType = BeerType.NONE\n Animator.playSingleAnimation(dish, \"Blank\")\n playSound(\"sounds/swallow.mp3\", false, getPlayerPosition())\n GrabableObjectComponent.getMutable(dish).type = IngredientType.BeerGlass\n } else {\n engine.removeEntity(dish)\n }\n\n\n }, 3000)\n\n }\n\n}\n\n\n\nexport function updateScore() {\n\n const [gameEntities] = engine.getEntitiesWith(GameData)\n const gameEntity = gameEntities[0]\n if (!gameEntity || !GameData.has(gameEntity)) return\n const gameData = GameData.getMutable(gameEntity)\n\n\n const scoreEntity = engine.getEntityOrNullByName(\"Score\")\n if (scoreEntity) {\n const scoreText = TextShape.getMutable(scoreEntity)\n scoreText.text = \"Score: \" + gameData.playerScore.toString()\n }\n\n}\n\nexport function updateMisses() {\n\n const [gameEntities] = engine.getEntitiesWith(GameData)\n const gameEntity = gameEntities[0]\n if (!gameEntity || !GameData.has(gameEntity)) return\n const gameData = GameData.getMutable(gameEntity)\n\n\n const missesEntity = engine.getEntityOrNullByName(\"Misses\")\n if (missesEntity) {\n const missesText = TextShape.getMutable(missesEntity)\n missesText.text = \"Misses: \" + gameData.playerMisses.toString()\n }\n}\n\n\nexport function restartGame() {\n\n const [gameEntities] = engine.getEntitiesWith(GameData)\n const gameEntity = gameEntities[0]\n if (!gameEntity || !GameData.has(gameEntity)) return\n const gameData = GameData.getMutable(gameEntity)\n\n\n gameData.playerScore = 0\n gameData.playerMisses = 0\n gameData.customerTimer = 2\n gameData.customerInterval = 10\n\n const customers = engine.getEntitiesWith(CustomerData)\n for (const [customer] of customers) {\n hideCustomer(customer)\n }\n\n updateScore()\n updateMisses()\n}", "import { engine, Animator, Entity, GltfContainer, PointerEvents, InputAction, PointerEventType } from \"@dcl/ecs\";\nimport { PotData, SoupState, Cooking, SyncEntityIDs, IngredientType, GrabableObjectComponent } from '../definitions'\nimport { pickUpItem } from \"./pickAndDrop\";\nimport { syncEntity, parentEntity } from '@dcl/sdk/network'\nimport { CreateProgressBar, HideProgressBar, ResetProgressBar } from \"./progressBars\";\n\n\nconst COOKED_AFTER: number = 5\nconst BURNT_AFTER: number = 10\n\n\n\n\nexport function instancePot(pot: Entity, id: number, pbid1: number, pbid2: number) {\n\n syncEntity(\n pot,\n [Cooking.componentId, PotData.componentId],\n id\n )\n\n const progressBar = CreateProgressBar(pot, 1, 270, true, true, 1, pbid1, pbid2)\n\n\n PotData.create(pot, {\n progressBar: progressBar,\n })\n\n PointerEvents.create(pot, {\n pointerEvents: [\n {\n eventType: PointerEventType.PET_DOWN,\n eventInfo: {\n hoverText: 'Add',\n maxDistance: 5,\n button: InputAction.IA_PRIMARY\n }\n }\n ]\n })\n\n\n\n\n}\n\n\n\n\nexport function pickFood(pot: Entity) {\n\n const potData = PotData.getMutable(pot)\n if (potData && potData.hasIngredient && potData.attachedEntity !== undefined) {\n\n console.log(\"PICKING UP FROM POT\")\n pickUpItem(potData.attachedEntity)\n potData.hasIngredient = false\n //potData.attachedEntity = undefined\n potData.state = SoupState.Raw\n\n if (Cooking.has(pot)) {\n Cooking.deleteFrom(pot)\n }\n\n HideProgressBar(potData.progressBar)\n\n }\n\n}\n\nexport function startCooking(pot: Entity) {\n\n if (Cooking.has(pot) && Cooking.get(pot).active) return\n\n\n\n Cooking.createOrReplace(pot)\n\n PotData.getMutable(pot)\n\n ResetProgressBar(PotData.getMutable(pot).progressBar)\n\n}\n\n\nexport function cookSystem(dt: number) {\n\n for (const [entity, _cooking, _potData] of engine.getEntitiesWith(Cooking, PotData)) {\n if (_cooking.active && _potData.hasIngredient) {\n\n const cooking = Cooking.getMutable(entity)\n\n\n\n cooking.time += dt\n\n if (cooking.time > COOKED_AFTER && _potData.hasIngredient && _potData.state === SoupState.Raw) {\n\n console.log(\"COOKED!\")\n\n const potData = PotData.getMutable(entity)\n potData.state = SoupState.Cooked\n const food = potData.attachedEntity\n GltfContainer.getMutable(food).src = \"assets/models/PlateNoodles.glb\"\n GrabableObjectComponent.getMutable(food).type = IngredientType.CookedNoodles\n\n } else if (cooking.time > BURNT_AFTER && _potData.state === SoupState.Cooked) {\n\n console.log(\"BURNING!!!\")\n\n GltfContainer.getMutable(entity).src = \"assets/models/CookingPotDirty.glb\"\n const potData = PotData.getMutable(entity)\n potData.state = SoupState.Burned\n const food = potData.attachedEntity\n GltfContainer.getMutable(food).src = \"assets/models/GarbageFood.glb\"\n GrabableObjectComponent.getMutable(food).type = IngredientType.Trash\n\n\n }\n\n } else if (_cooking.active && !_potData.hasIngredient) {\n Cooking.deleteFrom(entity)\n HideProgressBar(_potData.progressBar)\n }\n }\n}", "import {\n engine,\n inputSystem,\n InputAction,\n PointerEventType,\n Entity,\n Transform,\n AvatarAttach,\n AvatarAnchorPointType,\n Animator\n} from '@dcl/sdk/ecs'\nimport { Vector3, Quaternion } from '@dcl/sdk/math'\nimport { BeerGlass, CuttingBoard, PotData, SoupState, GrabableObjectComponent, IngredientType, PickedUp, TapBase, CustomerData } from '../definitions'\nimport { playSound } from './helpers'\nimport { currentPlayerId, getPlayerPosition } from './helpers'\nimport { syncEntity, parentEntity, getParent, removeParent, getChildren } from '@dcl/sdk/network'\nimport { ruinFood, switchToCutMode, switchToEmpty } from './cuttingBoard'\nimport { deliverOrder } from './customers'\nimport { pickFood } from './pot'\nimport { HideProgressBar } from './progressBars'\n\nexport function pickingGlassSystem() {\n // DROP\n // If there is some PickedUp, so the behvior is to listen when this\n // can be dropped\n for (const [entity, pickedUp] of engine.getEntitiesWith(PickedUp)) {\n const tryToDropCommand = inputSystem.getInputCommand(InputAction.IA_PRIMARY, PointerEventType.PET_DOWN)\n if (tryToDropCommand) {\n const pickedUpChild = Array.from(getChildren(entity))[0]\n if (pickedUp.avatarId !== currentPlayerId || !pickedUpChild) continue\n\n let drop = false\n const hitPosition = tryToDropCommand.hit?.position || getPlayerPosition()\n const hitEntity = tryToDropCommand.hit?.entityId as Entity\n const hitParentEntity = getParent(hitEntity)\n\n\n // If there is a tap base (the collider)\n if (hitParentEntity && TapBase.getOrNull(hitParentEntity)) {\n Transform.getMutable(pickedUpChild).rotation = Quaternion.Zero()\n Transform.getMutable(pickedUpChild).position = Vector3.Zero()\n console.log(\"DROPPED ON TAP\")\n //removeParent(pickedUpChild)\n parentEntity(pickedUpChild, hitParentEntity)\n drop = true\n } else if (hitParentEntity && CuttingBoard.has(hitParentEntity)) {\n //If cutting board\n console.log(\"DROPPED ON CUTTING BOARD\")\n const board = CuttingBoard.getMutable(hitParentEntity)\n if (!board || !board.hasRoll || !board.modelEntity) {\n //removeParent(pickedUpChild)\n parentEntity(pickedUpChild, hitParentEntity)\n drop = true\n Transform.getMutable(pickedUpChild).rotation = Quaternion.Zero()\n Transform.getMutable(pickedUpChild).position = Vector3.Zero()\n\n board.hasRoll = true\n board.rollChild = pickedUpChild\n board.cutting = false\n board.cuts = 0\n Animator.stopAllAnimations(hitEntity, true)\n\n switchToCutMode(board.modelEntity)\n\n }\n\n } else if (hitEntity && PotData.has(hitEntity)) {\n //If pot\n console.log(\"DROPPED ON POT\")\n const pot = PotData.getMutable(hitEntity)\n if (pot && !pot.hasIngredient) {\n //removeParent(pickedUpChild)\n parentEntity(pickedUpChild, hitEntity)\n pot.hasIngredient = true\n pot.attachedEntity = pickedUpChild\n pot.state = SoupState.Raw\n drop = true\n const grabbable = GrabableObjectComponent.get(pickedUpChild)\n\n if (grabbable.type !== IngredientType.Noodles) {\n ruinFood(pickedUpChild)\n }\n }\n\n } else {\n // Table or customer\n\n // Only it's allowed to hold the beer in surface parallel to floor\n\n const diff = Vector3.subtract(Vector3.Up(), tryToDropCommand.hit?.normalHit || Vector3.Zero())\n console.log(\"DROPPED ON TABLE \", Vector3.length(diff), tryToDropCommand.hit?.normalHit)\n if (Vector3.length(diff) < 0.05) {\n\n removeParent(pickedUpChild)\n Transform.createOrReplace(pickedUpChild, {\n position: hitPosition,\n parent: undefined\n })\n drop = true\n\n checkNearCustomer(pickedUpChild)\n }\n }\n\n\n\n // TODO: These line crashes the renderer\n // AvatarAttach.deleteFrom(entity)\n // engine.removeEntity(entity)\n if (drop) {\n PickedUp.deleteFrom(entity)\n\n playSound('sounds/putDown.mp3', false, hitPosition)\n }\n }\n\n // DRINK BEER\n // if (BeerGlass.has(pickedUp.child)) {\n // const glass = BeerGlass.get(pickedUp.child)\n\n // const tryToDrinkCommand = inputSystem.getInputCommand(InputAction.IA_SECONDARY, PointerEventType.PET_DOWN)\n // if (glass.filled && tryToDrinkCommand) {\n // BeerGlass.getMutable(pickedUp.child).filled = false\n // Animator.playSingleAnimation(pickedUp.child, 'Blank')\n // playSound('sounds/swallow.mp3', false, getPlayerPosition())\n // }\n // return\n // }\n return\n }\n\n // PICK UP\n // Only happens when there isn't any PickedUp component\n for (const [entity, grabbable] of engine.getEntitiesWith(GrabableObjectComponent, Transform)) {\n\n if (inputSystem.isTriggered(InputAction.IA_PRIMARY, PointerEventType.PET_DOWN, entity)) {\n\n\n if (grabbable.beingProcessed) { return }\n\n pickUpItem(entity)\n\n\n\n }\n }\n}\n\n\nexport function pickUpItem(entity: Entity) {\n const oldParent = getParent(entity)\n const parentToGrabbed = engine.addEntity()\n PickedUp.create(parentToGrabbed, {\n avatarId: currentPlayerId\n })\n\n AvatarAttach.create(parentToGrabbed, {\n avatarId: currentPlayerId,\n anchorPointId: AvatarAnchorPointType.AAPT_RIGHT_HAND\n })\n Transform.createOrReplace(entity, {\n position: Vector3.create(0, 0.225, 0),\n rotation: Quaternion.fromEulerDegrees(180, -90, -60),\n\n })\n\n syncEntity(parentToGrabbed, [AvatarAttach.componentId, Transform.componentId, PickedUp.componentId, GrabableObjectComponent.componentId])\n\n parentEntity(entity, parentToGrabbed)\n\n playSound('sounds/pickUp.mp3', false, getPlayerPosition())\n\n if (oldParent && PotData.has(oldParent)) {\n const pot = PotData.getMutable(oldParent)\n if (pot && pot.attachedEntity === entity) {\n pot.hasIngredient = false\n HideProgressBar(pot.progressBar)\n //pot.attachedEntity = undefined\n pot.state = SoupState.Empty\n\n pickFood(oldParent)\n\n }\n }\n\n if (oldParent && CuttingBoard.has(oldParent)) {\n const board = CuttingBoard.getMutable(oldParent)\n if (board && board.rollChild === entity) {\n board.hasRoll = false\n //board.rollChild = undefined\n board.cutting = false\n board.cuts = 0\n switchToEmpty(board.modelEntity)\n }\n }\n\n}\n\n\nexport function checkNearCustomer(entity: Entity) {\n\n const itemTransform = Transform.get(entity)\n let closestCustomer = null\n let closestDistance = 1.5\n\n for (const [entity, customer, customerTransform] of engine.getEntitiesWith(CustomerData, Transform)) {\n const diff = Vector3.length(Vector3.subtract(itemTransform.position, customerTransform.position))\n if (diff < closestDistance) {\n closestCustomer = entity\n closestDistance = diff\n }\n }\n\n if (closestCustomer) {\n\n const itemData = GrabableObjectComponent.get(entity)\n\n\n deliverOrder(itemData.type, closestCustomer, entity)\n }\n}\n\n", "import {\n engine,\n GltfContainer,\n Transform,\n Animator,\n PointerEvents,\n PointerEventType,\n InputAction,\n Entity,\n MeshCollider,\n MeshRenderer,\n AudioSource,\n ColliderLayer,\n pointerEventsSystem,\n Tween,\n EasingFunction\n} from '@dcl/sdk/ecs'\nimport { Vector3, Quaternion } from '@dcl/sdk/math'\nimport { BeerGlass, BeerType, CuttingBoard, getTapData, GrabableObjectComponent, IngredientType, SyncEntityIDs, TapBase, TapComponent } from '../definitions'\nimport { syncEntity, parentEntity } from '@dcl/sdk/network'\nimport { cutSushi } from './cuttingBoard'\nimport { getSyncId } from './helpers'\n\n\n\n\n// BEER GLASS\n\nexport function instanceBeer(entity: Entity, id: SyncEntityIDs) {\n\n BeerGlass.create(entity)\n\n GrabableObjectComponent.create(entity, { type: IngredientType.BeerGlass })\n\n\n // PointerEvents.create(glassEntity, {\n // pointerEvents: [\n // {\n // eventType: PointerEventType.PET_DOWN,\n // eventInfo: {\n // hoverText: 'Pick up',\n // maxDistance: 5,\n // button: InputAction.IA_PRIMARY\n // }\n // }\n // ]\n // })\n\n syncEntity(\n entity,\n [Animator.componentId, AudioSource.componentId, Transform.componentId, BeerGlass.componentId, GrabableObjectComponent.componentId],\n id\n )\n\n}\n\n\n// INGREDIENT\n\n\nexport function createIngredient(ingredient: IngredientType, position: Vector3, fall?: boolean) {\n const entity = engine.addEntity()\n\n let model = \"\"\n\n switch (ingredient) {\n case IngredientType.Noodles:\n model = \"assets/models/NoodlesRaw.glb\"\n break\n case IngredientType.SushiRoll:\n model = \"assets/models/SushiRoll.glb\"\n break\n case IngredientType.CookedNoodles:\n model = \"assets/models/PlateNoodles.glb\"\n break\n case IngredientType.SlicedSushi:\n model = \"assets/models/PlateSushi.glb\"\n break\n case IngredientType.Trash:\n model = \"assets/models/GarbageFood.glb\"\n break\n }\n\n GltfContainer.create(entity, {\n src: model,\n visibleMeshesCollisionMask: ColliderLayer.CL_POINTER,\n invisibleMeshesCollisionMask: undefined\n })\n\n Transform.create(entity, { position })\n\n GrabableObjectComponent.create(entity, { type: ingredient })\n\n PointerEvents.create(entity, {\n pointerEvents: [\n {\n eventType: PointerEventType.PET_DOWN,\n eventInfo: {\n hoverText: 'Pick up',\n maxDistance: 5,\n button: InputAction.IA_PRIMARY\n }\n }\n ]\n })\n\n if (fall) {\n Tween.create(entity, {\n mode: Tween.Mode.Move({\n start: position,\n end: Vector3.add(position, Vector3.create(0, -0.7, 0)),\n }),\n duration: 500,\n easingFunction: EasingFunction.EF_LINEAR\n })\n }\n\n let id = getSyncId(entity)\n\n syncEntity(\n entity,\n [AudioSource.componentId, Transform.componentId, GrabableObjectComponent.componentId, Tween.componentId, GltfContainer.componentId], id\n )\n\n return ingredient\n\n}\n\n\n// BEER TAP\n\nexport function createTap(tapBeerType: BeerType, dispenseEntity: Entity, id: SyncEntityIDs) {\n const tapEntity = engine.addEntity()\n const tapData = getTapData(tapBeerType)\n\n TapComponent.create(tapEntity, {\n beerType: tapBeerType\n })\n GltfContainer.create(tapEntity, {\n src: tapData.model\n })\n Transform.create(tapEntity, {\n //parent: dispenseEntity\n })\n parentEntity(tapEntity, dispenseEntity)\n Animator.create(tapEntity, {\n states: [\n {\n clip: 'Blank',\n playing: true,\n loop: false\n },\n {\n clip: 'Pour',\n loop: false\n }\n ]\n })\n\n PointerEvents.create(tapEntity, {\n pointerEvents: [\n {\n eventType: PointerEventType.PET_DOWN,\n eventInfo: {\n hoverText: 'Pour',\n maxDistance: 5,\n button: InputAction.IA_PRIMARY\n }\n }\n ]\n })\n\n\n syncEntity(tapEntity, [Animator.componentId, AudioSource.componentId], id)\n\n\n const tapColliderPosition = Vector3.add(tapData.position, Vector3.create(0, 0.05, 0))\n const colliderParentEntity = engine.addEntity()\n Transform.create(colliderParentEntity, {\n //parent: tapEntity,\n position: tapColliderPosition\n })\n TapBase.create(colliderParentEntity, {\n beerType: tapBeerType\n })\n syncEntity(colliderParentEntity, [], id + 100)\n parentEntity(colliderParentEntity, tapEntity)\n\n\n const colliderEntity = engine.addEntity()\n Transform.create(colliderEntity, {\n //parent: colliderParentEntity,\n scale: Vector3.scale(Vector3.One(), 0.33),\n rotation: Quaternion.fromEulerDegrees(90, 0, 0)\n })\n\n syncEntity(colliderEntity, [], id + 200)\n parentEntity(colliderEntity, colliderParentEntity)\n\n\n MeshCollider.setPlane(colliderEntity)\n // Debug to see the collider\n //MeshRenderer.setPlane(colliderEntity)\n PointerEvents.create(colliderEntity, {\n pointerEvents: [\n {\n eventType: PointerEventType.PET_DOWN,\n eventInfo: {\n hoverText: 'Place mug',\n button: InputAction.IA_PRIMARY\n }\n }\n ]\n })\n}\n\n// CUTTING BOARD\n\nexport function createCuttingBoard(position: Vector3, id: SyncEntityIDs) {\n\n\n const CutterParent = engine.addEntity()\n Transform.create(CutterParent, {\n position: position,\n rotation: Quaternion.fromEulerDegrees(0, 0, 0)\n })\n\n syncEntity(CutterParent, [], id + 100)\n\n const boardModel = engine.addEntity()\n\n CuttingBoard.create(CutterParent, {\n modelEntity: boardModel\n })\n\n GltfContainer.create(boardModel, {\n src: \"assets/models/Cutter.gltf\",\n visibleMeshesCollisionMask: ColliderLayer.CL_POINTER\n })\n\n Transform.create(boardModel, {\n position: Vector3.create(0, -0.1, 0),\n scale: Vector3.create(0.01, 0.01, 0.01),\n rotation: Quaternion.fromEulerDegrees(0, 180, 0)\n })\n\n\n\n Animator.create(boardModel, {\n states: [\n {\n clip: 'State0',\n playing: true,\n loop: false\n },\n {\n clip: 'State1',\n playing: false,\n loop: false\n },\n {\n clip: 'State2',\n playing: false,\n loop: false\n },\n {\n clip: 'State3',\n playing: false,\n loop: false\n },\n {\n clip: 'State4',\n playing: false,\n loop: false\n },\n {\n clip: 'State5',\n playing: false,\n loop: false\n },\n ]\n })\n\n\n pointerEventsSystem.onPointerDown(\n {\n entity: boardModel,\n opts: { button: InputAction.IA_PRIMARY, hoverText: 'Put', maxDistance: 5, },\n },\n function () {\n cutSushi(CutterParent, boardModel)\n console.log('clicked entity')\n }\n )\n\n\n\n syncEntity(boardModel, [Animator.componentId, AudioSource.componentId, CuttingBoard.componentId, PointerEvents.componentId], id)\n\n parentEntity(boardModel, CutterParent)\n\n\n\n\n\n // const colliderEntity = engine.addEntity()\n // Transform.create(colliderEntity, {\n // parent: colliderParentEntity,\n // scale: Vector3.scale(Vector3.One(), 0.33),\n // rotation: Quaternion.fromEulerDegrees(90, 0, 0)\n // })\n\n // syncEntity(colliderEntity, [], id + 200)\n // parentEntity(colliderEntity, colliderParentEntity)\n\n\n // MeshCollider.setPlane(colliderEntity)\n // // Debug to see the collider\n // //MeshRenderer.setPlane(colliderEntity)\n // PointerEvents.create(colliderEntity, {\n // pointerEvents: [\n // {\n // eventType: PointerEventType.PET_DOWN,\n // eventInfo: {\n // hoverText: 'Place mug',\n // button: InputAction.IA_PRIMARY\n // }\n // }\n // ]\n // })\n}\n\n\n\n\n", "import { Animator, engine, InputAction, inputSystem, PointerEventType, Transform } from '@dcl/sdk/ecs'\nimport { Scalar } from '@dcl/sdk/math'\nimport { BeerGlass, BeerType, getTapData, GrabableObjectComponent, IngredientType, TapBase, TapComponent } from '../definitions'\nimport { getPlayerPosition, playSound } from './helpers'\nimport { getParent } from '@dcl/sdk/network'\n\nfunction getBeerBehindTap(beerType: BeerType) {\n for (const [glassEntity] of engine.getEntitiesWith(BeerGlass)) {\n\n const glassParent = getParent(glassEntity)\n if (glassParent && TapBase.getOrNull(glassParent)?.beerType === beerType) {\n return glassEntity\n }\n }\n}\n\nexport function tapPumpSystem(dt: number) {\n for (const [entity, tapReadonly] of engine.getEntitiesWith(TapComponent)) {\n // While is pouring\n if (tapReadonly.pouring) {\n // At start the pouring, play the sound an animation\n if (Scalar.withinEpsilon(tapReadonly.pouringTime, 0)) {\n Animator.playSingleAnimation(entity, `Pour`)\n playSound('sounds/beerPump.mp3', false, getPlayerPosition())\n const glassEntity = getBeerBehindTap(tapReadonly.beerType)\n if (glassEntity) Animator.playSingleAnimation(glassEntity, `Pour${getTapData(tapReadonly.beerType).name}`)\n }\n\n const tap = TapComponent.getMutable(entity)\n tap.pouringTime += dt\n\n if (tap.pouringTime >= 2.5) {\n tap.pouring = false\n tap.pouringTime = 0\n\n const glassEntity = getBeerBehindTap(tap.beerType)\n if (glassEntity) {\n const glass = BeerGlass.getMutable(glassEntity)\n glass.beerType = tap.beerType\n //glass.beingFilled = false\n glass.filled = true\n const grabbable = GrabableObjectComponent.getMutable(glassEntity)\n grabbable.beingProcessed = false\n }\n }\n\n // Listen the action\n } else if (inputSystem.isTriggered(InputAction.IA_PRIMARY, PointerEventType.PET_DOWN, entity)) {\n const glassEntity = getBeerBehindTap(tapReadonly.beerType)\n if (!glassEntity) {\n // TODO: notify that there is no glass\n return\n }\n\n const glass = BeerGlass.getMutable(glassEntity)\n if (glass.filled) {\n // TODO: notify that the glass is filled\n return\n }\n\n const tap = TapComponent.getMutable(entity)\n tap.pouring = true\n tap.pouringTime = 0\n\n //glass.beingFilled = true\n glass.beerType = tap.beerType\n const grabbable = GrabableObjectComponent.getMutable(glassEntity)\n grabbable.beingProcessed = true\n switch (tap.beerType) {\n case BeerType.YELLOW:\n grabbable.type = IngredientType.YellowBeer\n break\n case BeerType.RED:\n grabbable.type = IngredientType.RedBeer\n break\n case BeerType.GREEN:\n grabbable.type = IngredientType.GreenBeer\n break\n\n }\n\n grabbable.type\n }\n }\n}\n", "import { openExternalUrl } from \"~system/RestrictedActions\"\nimport ReactEcs, { Label, ReactEcsRenderer, UiEntity } from '@dcl/sdk/react-ecs'\nimport { TextAlignMode, TextureFilterMode, TextureWrapMode } from \"@dcl/sdk/ecs\"\nimport { Color4 } from \"@dcl/sdk/math\"\n\n\nconst projectPath = \"beer-dispenser\"\n\nconst uiComponent = () => (\n\t[\n\t\tGitHubLinkUi()\n\t\t// Other UI elements\n\t]\n)\n\nexport function setupUi() {\n\tReactEcsRenderer.setUiRenderer(uiComponent)\n}\n\nfunction GitHubLinkUi() {\n\n\tconst fullPath = \"https://github.com/decentraland/sdk7-goerli-plaza/tree/main/\" + projectPath\n\n\n\treturn \n\t\t {\n\t\t\t\tconsole.log(\"OPENING LINK\")\n\t\t\t\topenExternalUrl({ url: fullPath })\n\t\t\t}}\n\t\t/>\n\t\t\n\t\n}\n\n", "import React from 'react';\n/**\n * @public\n */\nexport var ReactEcs;\n(function (ReactEcs) {\n ReactEcs.createElement = React.createElement;\n})(ReactEcs || (ReactEcs = {}));\n", "import * as components from '@dcl/ecs/dist/components';\nimport Reconciler from 'react-reconciler';\nimport { isListener } from '../components';\nimport { CANVAS_ROOT_ENTITY } from '../components/uiTransform';\nimport { componentKeys, isNotUndefined, noopConfig, propsChanged } from './utils';\nfunction getPointerEnum(pointerKey) {\n const pointers = {\n onMouseDown: 1 /* PointerEventType.PET_DOWN */,\n onMouseUp: 0 /* PointerEventType.PET_UP */\n };\n return pointers[pointerKey];\n}\nexport function createReconciler(engine, pointerEvents) {\n // Store all the entities so when we destroy the UI we can also destroy them\n const entities = new Set();\n // Store the onChange callbacks to be runned every time a Result has changed\n const changeEvents = new Map();\n const clickEvents = new Map();\n // Initialize components\n const UiTransform = components.UiTransform(engine);\n const UiText = components.UiText(engine);\n const UiBackground = components.UiBackground(engine);\n const UiInput = components.UiInput(engine);\n const UiInputResult = components.UiInputResult(engine);\n const UiDropdown = components.UiDropdown(engine);\n const UiDropdownResult = components.UiDropdownResult(engine);\n // Component ID Helper\n const getComponentId = {\n uiTransform: UiTransform.componentId,\n uiText: UiText.componentId,\n uiBackground: UiBackground.componentId,\n uiInput: UiInput.componentId,\n uiDropdown: UiDropdown.componentId\n };\n function pointerEventCallback(entity, pointerEvent) {\n const callback = clickEvents.get(entity)?.get(pointerEvent);\n if (callback)\n callback();\n return;\n }\n function updateTree(instance, props) {\n upsertComponent(instance, props, 'uiTransform');\n }\n function upsertListener(instance, update) {\n if (update.type === 'delete' || !update.props) {\n clickEvents.get(instance.entity)?.delete(getPointerEnum(update.component));\n if (update.component === 'onMouseDown') {\n pointerEvents.removeOnPointerDown(instance.entity);\n }\n else if (update.component === 'onMouseUp') {\n pointerEvents.removeOnPointerUp(instance.entity);\n }\n return;\n }\n if (update.props) {\n const pointerEvent = getPointerEnum(update.component);\n const entityEvent = clickEvents.get(instance.entity) || clickEvents.set(instance.entity, new Map()).get(instance.entity);\n const alreadyHasPointerEvent = entityEvent.get(pointerEvent);\n entityEvent.set(pointerEvent, update.props);\n if (alreadyHasPointerEvent)\n return;\n const pointerEventSystem = update.component === 'onMouseDown' ? pointerEvents.onPointerDown : pointerEvents.onPointerUp;\n pointerEventSystem(instance.entity, () => pointerEventCallback(instance.entity, pointerEvent), {\n button: 0 /* InputAction.IA_POINTER */,\n // We add this showFeedBack so the pointerEventSystem creates a PointerEvent component with our entity\n // This is needed for the renderer to know which entities are clickeables\n showFeedback: true\n });\n }\n }\n function removeComponent(instance, component) {\n const componentId = getComponentId[component];\n const Component = engine.getComponent(componentId);\n Component.deleteFrom(instance.entity);\n }\n function upsertComponent(instance, props = {}, componentName) {\n const componentId = getComponentId[componentName];\n const onChangeExists = 'onChange' in props;\n const onSubmitExists = 'onSubmit' in props;\n const entityState = changeEvents.get(instance.entity)?.get(componentId);\n const onChange = onChangeExists\n ? props['onChange']\n : entityState?.onChangeCallback;\n const onSubmit = onSubmitExists\n ? props['onSubmit']\n : entityState?.onSubmitCallback;\n if (onChangeExists || onSubmitExists) {\n updateOnChange(instance.entity, componentId, {\n onChangeCallback: onChange,\n onSubmitCallback: onSubmit\n });\n delete props.onChange;\n delete props.onSubmit;\n }\n // We check if there is any key pending to be changed to avoid updating the existing component\n if (!Object.keys(props).length) {\n return;\n }\n const ComponentDef = engine.getComponent(componentId);\n const component = ComponentDef.getMutableOrNull(instance.entity) || ComponentDef.create(instance.entity);\n for (const key in props) {\n const keyProp = key;\n component[keyProp] = props[keyProp];\n }\n }\n function removeChildEntity(instance) {\n changeEvents.delete(instance.entity);\n engine.removeEntity(instance.entity);\n for (const child of instance._child) {\n removeChildEntity(child);\n }\n }\n function appendChild(parent, child) {\n if (!child || !Object.keys(parent).length)\n return;\n const isReorder = parent._child.find((c) => c.entity === child.entity);\n // If its a reorder its seems that its a mutation of an array with key prop\n // We need to move the child to the end of the array\n // And update the order of the parent_.child array\n // child.rightOf => Latest entity of the array\n // childThatWasAtRightOfEntity = childEntity.rightOf\n if (isReorder) {\n const rightOfChild = parent._child.find((c) => c.rightOf === child.entity);\n if (rightOfChild) {\n rightOfChild.rightOf = child.rightOf;\n // Re-order parent._child array\n parent._child = parent._child.filter((c) => c.entity !== child.entity);\n parent._child.push(child);\n updateTree(rightOfChild, { rightOf: rightOfChild.rightOf });\n }\n // Its a re-order. We are the last element, so we need to fetch the element before us.\n child.rightOf = parent._child[parent._child.length - 2]?.entity;\n }\n else {\n // Its an append. Put it at the end\n child.rightOf = parent._child[parent._child.length - 1]?.entity;\n parent._child.push(child);\n }\n child.parent = parent.entity;\n updateTree(child, { rightOf: child.rightOf, parent: parent.entity });\n }\n function removeChild(parentInstance, child) {\n const childIndex = parentInstance._child.findIndex((c) => c.entity === child.entity);\n const childToModify = parentInstance._child[childIndex + 1];\n if (childToModify) {\n childToModify.rightOf = child.rightOf;\n updateTree(childToModify, { rightOf: child.rightOf });\n }\n // Mutate \uD83D\uDC80\n parentInstance._child.splice(childIndex, 1);\n removeChildEntity(child);\n }\n function updateOnChange(entity, componentId, state) {\n const event = changeEvents.get(entity) || changeEvents.set(entity, new Map()).get(entity);\n const oldState = event.get(componentId);\n const onChangeCallback = state?.onChangeCallback;\n const onSubmitCallback = state?.onSubmitCallback;\n const value = state?.value ?? oldState?.value;\n const isSubmit = state?.isSubmit ?? oldState?.isSubmit;\n event.set(componentId, { onChangeCallback, onSubmitCallback, value, isSubmit });\n }\n const hostConfig = {\n ...noopConfig,\n createInstance(type, props) {\n const entity = engine.addEntity();\n entities.add(entity);\n const instance = {\n entity,\n _child: [],\n parent: CANVAS_ROOT_ENTITY,\n rightOf: undefined\n };\n for (const key in props) {\n const keyTyped = key;\n if (keyTyped === 'children' || keyTyped === 'key') {\n continue;\n }\n if (isListener(keyTyped)) {\n upsertListener(instance, {\n type: 'add',\n props: props[keyTyped],\n component: keyTyped\n });\n }\n else {\n upsertComponent(instance, props[keyTyped], keyTyped);\n }\n }\n return instance;\n },\n appendChild,\n appendChildToContainer: appendChild,\n appendInitialChild: appendChild,\n removeChild: removeChild,\n prepareUpdate(_instance, _type, oldProps, newProps) {\n return componentKeys\n .map((component) => propsChanged(component, oldProps[component], newProps[component]))\n .filter(isNotUndefined);\n },\n commitUpdate(instance, updatePayload, _type, _prevProps, _nextProps, _internalHandle) {\n for (const update of updatePayload) {\n if (isListener(update.component)) {\n upsertListener(instance, update);\n continue;\n }\n if (update.type === 'delete') {\n removeComponent(instance, update.component);\n }\n else if (update.props) {\n upsertComponent(instance, update.props, update.component);\n }\n }\n },\n insertBefore(parentInstance, child, beforeChild) {\n const beforeChildIndex = parentInstance._child.findIndex((c) => c.entity === beforeChild.entity);\n parentInstance._child = [\n ...parentInstance._child.slice(0, beforeChildIndex),\n child,\n ...parentInstance._child.slice(beforeChildIndex)\n ];\n child.rightOf = beforeChild.rightOf;\n beforeChild.rightOf = child.entity;\n child.parent = parentInstance.entity;\n updateTree(child, { rightOf: child.rightOf, parent: child.parent });\n updateTree(beforeChild, { rightOf: beforeChild.rightOf });\n },\n removeChildFromContainer(parenInstance, child) {\n removeChildEntity(child);\n }\n };\n const reconciler = Reconciler(hostConfig);\n const root = reconciler.createContainer({}, 0, null, false, null, '', \n /* istanbul ignore next */\n function () { }, null);\n // Maybe this could be something similar to Input system, but since we\n // are going to use this only here, i prefer to scope it here.\n function handleOnChange(componentId, resultComponent) {\n for (const [entity, Result] of engine.getEntitiesWith(resultComponent)) {\n const entityState = changeEvents.get(entity)?.get(componentId);\n const isSubmit = !!Result.isSubmit;\n if (entityState?.onChangeCallback && Result.value !== entityState.value) {\n entityState.onChangeCallback(Result.value);\n }\n if (entityState?.onSubmitCallback && isSubmit && !entityState.isSubmit) {\n entityState.onSubmitCallback(Result.value);\n }\n updateOnChange(entity, componentId, {\n onChangeCallback: entityState?.onChangeCallback,\n onSubmitCallback: entityState?.onSubmitCallback,\n value: Result.value,\n isSubmit\n });\n }\n }\n return {\n update: function (component) {\n if (changeEvents.size) {\n handleOnChange(UiInput.componentId, UiInputResult);\n handleOnChange(UiDropdown.componentId, UiDropdownResult);\n }\n return reconciler.updateContainer(component, root, null);\n },\n getEntities: () => Array.from(entities)\n };\n}\n", "const parseFont = {\n 'sans-serif': 0 /* Font.F_SANS_SERIF */,\n serif: 1 /* Font.F_SERIF */,\n monospace: 2 /* Font.F_MONOSPACE */\n};\n/**\n * @internal\n */\nexport function getFont(font) {\n if (!font)\n return undefined;\n return { font: parseFont[font] };\n}\nconst parseTextAlign = {\n 'top-left': 0 /* TextAlignMode.TAM_TOP_LEFT */,\n 'top-center': 1 /* TextAlignMode.TAM_TOP_CENTER */,\n 'top-right': 2 /* TextAlignMode.TAM_TOP_RIGHT */,\n 'middle-left': 3 /* TextAlignMode.TAM_MIDDLE_LEFT */,\n 'middle-center': 4 /* TextAlignMode.TAM_MIDDLE_CENTER */,\n 'middle-right': 5 /* TextAlignMode.TAM_MIDDLE_RIGHT */,\n 'bottom-left': 6 /* TextAlignMode.TAM_BOTTOM_LEFT */,\n 'bottom-center': 7 /* TextAlignMode.TAM_BOTTOM_CENTER */,\n 'bottom-right': 8 /* TextAlignMode.TAM_BOTTOM_RIGHT */\n};\n/**\n * @internal\n */\nexport function getTextAlign(textAlign) {\n if (!textAlign)\n return undefined;\n return { textAlign: parseTextAlign[textAlign] };\n}\n", "const parseTextureMode = {\n 'nine-slices': 0 /* BackgroundTextureMode.NINE_SLICES */,\n center: 1 /* BackgroundTextureMode.CENTER */,\n stretch: 2 /* BackgroundTextureMode.STRETCH */\n};\n/**\n * @internal\n */\nexport function getTextureMode(mode) {\n const value = mode ? parseTextureMode[mode] : 1 /* BackgroundTextureMode.CENTER */;\n return { textureMode: value };\n}\n/**\n * @internal\n */\nexport function getTexture(props) {\n if (props.texture) {\n return {\n tex: {\n $case: 'texture',\n texture: parseTexture(props.texture)\n }\n };\n }\n if (props.avatarTexture) {\n return {\n tex: {\n $case: 'avatarTexture',\n avatarTexture: parseTexture(props.avatarTexture)\n }\n };\n }\n return undefined;\n}\nfunction parseTexture(texture) {\n return {\n ...texture,\n wrapMode: texture.wrapMode ? parseWrap[texture.wrapMode] : undefined,\n filterMode: texture.filterMode ? parseFilter[texture.filterMode] : undefined\n };\n}\nconst parseWrap = {\n repeat: 0 /* TextureWrapMode.TWM_REPEAT */,\n clamp: 1 /* TextureWrapMode.TWM_CLAMP */,\n mirror: 2 /* TextureWrapMode.TWM_MIRROR */\n};\nconst parseFilter = {\n point: 0 /* TextureFilterMode.TFM_POINT */,\n 'bi-linear': 1 /* TextureFilterMode.TFM_BILINEAR */,\n 'tri-linear': 2 /* TextureFilterMode.TFM_TRILINEAR */\n};\n", "import { getTexture, getTextureMode } from './utils';\n/**\n * @public\n */\n/* @__PURE__ */\nexport function parseUiBackground(props) {\n if (!props || !Object.keys(props).length)\n return undefined;\n const texture = getTexture(props);\n return {\n ...props,\n ...getTextureMode(props.textureMode),\n uvs: props.uvs ?? [],\n texture\n };\n}\n", "function capitalize(value) {\n return `${value[0].toUpperCase()}${value.slice(1, value.length)}`;\n}\nfunction isPercent(val) {\n return typeof val === 'string' && val.endsWith('%');\n}\nfunction isPoint(val) {\n return typeof val === 'string' && val.endsWith('px');\n}\nfunction parsePositionUnit(val) {\n function getValue(key, value) {\n return Number(value.slice(0, value.indexOf(key)));\n }\n if (val === undefined || val === null) {\n return [undefined, 0 /* YGUnit.YGU_UNDEFINED */];\n }\n if (val === 'auto') {\n return [0, 3 /* YGUnit.YGU_AUTO */];\n }\n if (typeof val === 'number' || (typeof val === 'string' && !isNaN(Number(val)))) {\n return [Number(val), 1 /* YGUnit.YGU_POINT */];\n }\n if (isPercent(val)) {\n return [getValue('%', val), 2 /* YGUnit.YGU_PERCENT */];\n }\n if (isPoint(val)) {\n return [getValue('px', val), 1 /* YGUnit.YGU_POINT */];\n }\n return [undefined, 0 /* YGUnit.YGU_UNDEFINED */];\n}\nexport function parsePosition(position = {}, prop) {\n if (typeof position === 'object') {\n const obj = {};\n for (const key in position) {\n const typedKey = key;\n const propKey = `${prop}${capitalize(typedKey)}`;\n const propKeyUnit = `${prop}${capitalize(typedKey)}Unit`;\n const [value, unit] = parsePositionUnit(position[typedKey]);\n if (value === undefined)\n continue;\n obj[propKeyUnit] = unit;\n obj[propKey] = value;\n }\n return obj;\n }\n if (typeof position === 'number') {\n return parsePosition({ top: position, left: position, right: position, bottom: position }, prop);\n }\n const values = position.split(' ').filter((a) => a !== '');\n if (values.length === 1) {\n const [value] = values;\n return parsePosition({ top: value, left: value, right: value, bottom: value }, prop);\n }\n if (values.length === 2) {\n const [topBottom, rigthLeft] = values;\n return parsePosition({ top: topBottom, left: rigthLeft, right: rigthLeft, bottom: topBottom }, prop);\n }\n if (values.length === 3) {\n const [top, rigthLeft, bottom] = values;\n return parsePosition({ top, left: rigthLeft, right: rigthLeft, bottom }, prop);\n }\n const [top, right, bottom, left] = values;\n return parsePosition({ top, right, bottom, left }, prop);\n}\nexport function parseSize(val, key) {\n const unitKey = `${key}Unit`;\n const [value, unit] = parsePositionUnit(val);\n if (value === undefined)\n return {};\n return {\n [key]: value,\n [unitKey]: unit\n };\n}\n/**\n * @internal\n */\nexport function getDisplay(display) {\n const value = display ? parseDisplay[display] : 0 /* YGDisplay.YGD_FLEX */;\n return { display: value };\n}\nconst parseDisplay = {\n flex: 0 /* YGDisplay.YGD_FLEX */,\n none: 1 /* YGDisplay.YGD_NONE */\n};\n/**\n * @internal\n */\nexport function getJustify(justify) {\n const value = justify ? parseJustify[justify] : 0 /* YGJustify.YGJ_FLEX_START */;\n return { justifyContent: value };\n}\nconst parseJustify = {\n center: 1 /* YGJustify.YGJ_CENTER */,\n 'flex-end': 2 /* YGJustify.YGJ_FLEX_END */,\n 'flex-start': 0 /* YGJustify.YGJ_FLEX_START */,\n 'space-around': 4 /* YGJustify.YGJ_SPACE_AROUND */,\n 'space-between': 3 /* YGJustify.YGJ_SPACE_BETWEEN */,\n 'space-evenly': 5 /* YGJustify.YGJ_SPACE_EVENLY */\n};\n/**\n * @internal\n */\nexport function getAlign(prop, align) {\n const value = parseAligns[align];\n return { [prop]: value };\n}\nconst parseAligns = {\n auto: 0 /* YGAlign.YGA_AUTO */,\n baseline: 5 /* YGAlign.YGA_BASELINE */,\n center: 2 /* YGAlign.YGA_CENTER */,\n 'flex-end': 3 /* YGAlign.YGA_FLEX_END */,\n 'flex-start': 1 /* YGAlign.YGA_FLEX_START */,\n stretch: 4 /* YGAlign.YGA_STRETCH */,\n 'space-between': 6 /* YGAlign.YGA_SPACE_BETWEEN */,\n 'space-around': 7 /* YGAlign.YGA_SPACE_AROUND */\n};\n/**\n * @internal\n */\nexport function getFlexDirection(flexDirection) {\n const value = flexDirection ? parseFlexDirection[flexDirection] : 0 /* YGFlexDirection.YGFD_ROW */;\n return { flexDirection: value };\n}\nconst parseFlexDirection = {\n row: 0 /* YGFlexDirection.YGFD_ROW */,\n column: 1 /* YGFlexDirection.YGFD_COLUMN */,\n 'row-reverse': 3 /* YGFlexDirection.YGFD_ROW_REVERSE */,\n 'column-reverse': 2 /* YGFlexDirection.YGFD_COLUMN_REVERSE */\n};\n/**\n * @internal\n */\nexport function getFlexWrap(flexWrap) {\n const value = parseFlexWrap[flexWrap];\n return { flexWrap: value };\n}\nconst parseFlexWrap = {\n wrap: 1 /* YGWrap.YGW_WRAP */,\n nowrap: 0 /* YGWrap.YGW_NO_WRAP */,\n 'wrap-reverse': 2 /* YGWrap.YGW_WRAP_REVERSE */\n};\n/**\n * @internal\n */\nexport function getOverflow(overflow) {\n const value = overflow ? parseOverflow[overflow] : 0 /* YGOverflow.YGO_VISIBLE */;\n return { overflow: value };\n}\nconst parseOverflow = {\n visible: 0 /* YGOverflow.YGO_VISIBLE */,\n scroll: 2 /* YGOverflow.YGO_SCROLL */,\n hidden: 1 /* YGOverflow.YGO_HIDDEN */\n};\n/**\n * @internal\n */\nexport function getPositionType(position) {\n const value = position ? parsePositionType[position] : 0 /* YGPositionType.YGPT_RELATIVE */;\n return { positionType: value };\n}\nconst parsePositionType = {\n relative: 0 /* YGPositionType.YGPT_RELATIVE */,\n absolute: 1 /* YGPositionType.YGPT_ABSOLUTE */\n};\n/**\n * @internal\n */\nexport function getPointerFilter(pointerFilter) {\n const value = pointerFilter ? parsePointerFilter[pointerFilter] : 0 /* PointerFilterMode.PFM_NONE */;\n return { pointerFilter: value };\n}\nconst parsePointerFilter = {\n none: 0 /* PointerFilterMode.PFM_NONE */,\n block: 1 /* PointerFilterMode.PFM_BLOCK */\n};\n", "import { getAlign, getDisplay, getFlexDirection, getFlexWrap, getJustify, getOverflow, getPointerFilter, getPositionType, parsePosition, parseSize } from './utils';\n/**\n * @internal\n */\nexport const CANVAS_ROOT_ENTITY = 0;\nconst defaultUiTransform = {\n overflow: 0 /* YGOverflow.YGO_VISIBLE */,\n display: 0 /* YGDisplay.YGD_FLEX */,\n justifyContent: 0 /* YGJustify.YGJ_FLEX_START */,\n alignSelf: 0 /* YGAlign.YGA_AUTO */,\n flexDirection: 0 /* YGFlexDirection.YGFD_ROW */,\n positionType: 0 /* YGPositionType.YGPT_RELATIVE */,\n parent: CANVAS_ROOT_ENTITY,\n rightOf: 0,\n flexBasis: 0,\n width: 0,\n height: 0,\n minWidth: 0,\n minHeight: 0,\n maxWidth: 0,\n maxHeight: 0,\n flexGrow: 0,\n marginBottom: 0,\n marginBottomUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n marginLeft: 0,\n marginLeftUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n marginRight: 0,\n marginRightUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n marginTop: 0,\n marginTopUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n maxHeightUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n maxWidthUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n minHeightUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n minWidthUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n paddingBottom: 0,\n paddingBottomUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n paddingLeft: 0,\n paddingLeftUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n paddingTopUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n paddingRight: 0,\n paddingRightUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n paddingTop: 0,\n positionBottom: 0,\n positionBottomUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n positionLeft: 0,\n positionLeftUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n positionRight: 0,\n positionRightUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n positionTop: 0,\n positionTopUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n flexBasisUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n widthUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n heightUnit: 0 /* YGUnit.YGU_UNDEFINED */,\n pointerFilter: 0 /* PointerFilterMode.PFM_NONE */\n};\n/**\n * @public\n */\n/* @__PURE__ */\nexport function parseUiTransform(props = {}) {\n const { height, minHeight, maxHeight, width, minWidth, maxWidth, alignItems, alignContent, flexWrap, ...otherProps } = props;\n return {\n ...defaultUiTransform,\n ...otherProps,\n ...parsePosition(props.position, 'position'),\n ...parsePosition(props.margin, 'margin'),\n ...parsePosition(props.padding, 'padding'),\n ...parseSize(props.height, 'height'),\n ...parseSize(props.minHeight, 'minHeight'),\n ...parseSize(props.maxHeight, 'maxHeight'),\n ...parseSize(props.width, 'width'),\n ...parseSize(props.minWidth, 'minWidth'),\n ...parseSize(props.maxWidth, 'maxWidth'),\n ...getDisplay(props.display),\n ...getAlign('alignSelf', props.alignSelf ?? 'auto'),\n ...getJustify(props.justifyContent),\n ...getFlexDirection(props.flexDirection),\n ...getOverflow(props.overflow),\n ...getPointerFilter(props.pointerFilter),\n ...getPositionType(props.positionType),\n // Optional values\n ...(alignContent && getAlign('alignContent', alignContent)),\n ...(alignItems && getAlign('alignItems', alignItems)),\n ...(flexWrap && getFlexWrap(flexWrap))\n };\n}\n", "import { parseUiBackground } from './uiBackground';\nimport { parseUiTransform } from './uiTransform';\n/**\n * @internal\n */\nexport function parseProps(props) {\n const { uiTransform, uiBackground, ...otherProps } = props;\n const uiTransformProps = parseUiTransform(uiTransform);\n const uiBackgroundProps = uiBackground ? { uiBackground: parseUiBackground(uiBackground) } : undefined;\n return {\n ...otherProps,\n uiTransform: uiTransformProps,\n ...uiBackgroundProps\n };\n}\n", "const listeners = {\n onMouseDown: undefined,\n onMouseUp: undefined\n};\nconst listenersKey = Object.keys(listeners);\n/**\n * @internal\n */\nexport const isListener = (key) => listenersKey.includes(key);\n", "import { parseProps } from '../utils';\nimport { ReactEcs } from '../../react-ecs';\nimport { getFont, getTextAlign } from './utils';\n/**\n *\n * @public\n * Label component\n *\n * A label displays text content\n *\n * @example\n *